mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

gbellato
25.35.2007 5349c97806bb0a00038d8dc3dee4254fad187649
opends/tests/unit-tests-testng/src/server/org/opends/server/replication/SchemaReplicationTest.java
File was renamed from opends/tests/unit-tests-testng/src/server/org/opends/server/replication/SchemaSynchronizationTest.java
@@ -43,11 +43,10 @@
import org.opends.server.core.DirectoryServer;
import org.opends.server.core.ModifyOperation;
import org.opends.server.protocols.internal.InternalClientConnection;
import org.opends.server.protocols.ldap.LDAPModification;
import org.opends.server.replication.common.ChangeNumberGenerator;
import org.opends.server.replication.plugin.ChangelogBroker;
import org.opends.server.replication.protocol.ModifyMsg;
import org.opends.server.replication.protocol.SynchronizationMessage;
import org.opends.server.replication.protocol.ReplicationMessage;
import org.opends.server.types.Attribute;
import org.opends.server.types.AttributeType;
import org.opends.server.types.AttributeValue;
@@ -63,9 +62,9 @@
import org.testng.annotations.Test;
/**
 * Test for the schema synchronization.
 * Test for the schema replication.
 */
public class SchemaSynchronizationTest extends SynchronizationTestCase
public class SchemaReplicationTest extends ReplicationTestCase
{
  private ArrayList<Modification> rcvdMods = null;
@@ -74,7 +73,6 @@
  /**
   * Set up the environment for performing the tests in this Class.
   * synchronization
   *
   * @throws Exception
   *           If the environment could not be set up.
@@ -122,7 +120,7 @@
        + "ds-cfg-directory-server-id: 1\n";
    synchroServerEntry = TestCaseUtils.entryFromLdifString(synchroServerLdif);
    configureSynchronization();
    configureReplication();
  }
  /**
@@ -134,7 +132,7 @@
  {
    logError(ErrorLogCategory.SYNCHRONIZATION,
        ErrorLogSeverity.NOTICE,
        "Starting synchronization test : pushSchemaChange ", 1);
        "Starting replication test : pushSchemaChange ", 1);
    final DN baseDn = DN.decode("cn=schema");
@@ -163,10 +161,10 @@
                 "The original operation failed");
      // See if the client has received the msg
      SynchronizationMessage msg = broker.receive();
      ReplicationMessage msg = broker.receive();
      assertTrue(msg instanceof ModifyMsg,
                 "The received synchronization message is not a MODIFY msg");
                 "The received replication message is not a MODIFY msg");
      ModifyMsg modMsg = (ModifyMsg) msg;
      Operation receivedOp = modMsg.createOperation(connection);
@@ -174,7 +172,7 @@
                 "The received message is not for cn=schema");
      assertTrue(receivedOp instanceof ModifyOperation,
                 "The received synchronization message is not a MODIFY msg");
                 "The received replication message is not a MODIFY msg");
      ModifyOperation receivedModifyOperation = (ModifyOperation) receivedOp;
      List<RawModification> rcvdRawMods =
@@ -213,14 +211,14 @@
  /**
   * Checks that changes to the schema pushed to the changelog
   * are received and correctly replayed by synchronization plugin.
   * are received and correctly replayed by replication plugin.
   */
  @Test(dependsOnMethods = { "pushSchemaChange" })
  public void replaySchemaChange() throws Exception
  {
    logError(ErrorLogCategory.SYNCHRONIZATION,
        ErrorLogSeverity.NOTICE,
        "Starting synchronization test : pushSchemaChange ", 1);
        "Starting replication test : pushSchemaChange ", 1);
    final DN baseDn = DN.decode("cn=schema");
@@ -254,7 +252,7 @@
  {
    logError(ErrorLogCategory.SYNCHRONIZATION,
        ErrorLogSeverity.NOTICE,
        "Starting synchronization test : pushSchemaFilesChange ", 1);
        "Starting replication test : pushSchemaFilesChange ", 1);
    final DN baseDn = DN.decode("cn=schema");
@@ -278,10 +276,10 @@
    }
    // receive the message on the broker side.
    SynchronizationMessage msg = broker.receive();
    ReplicationMessage msg = broker.receive();
    assertTrue(msg instanceof ModifyMsg,
               "The received synchronization message is not a MODIFY msg");
               "The received replication message is not a MODIFY msg");
    ModifyMsg modMsg = (ModifyMsg) msg;
    Operation receivedOp = modMsg.createOperation(connection);
@@ -289,7 +287,7 @@
               "The received message is not for cn=schema");
    assertTrue(receivedOp instanceof ModifyOperation,
               "The received synchronization message is not a MODIFY msg");
               "The received replication message is not a MODIFY msg");
    ModifyOperation receivedModifyOperation = (ModifyOperation) receivedOp;
    List<RawModification> rcvdRawMods =