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

Nicolas Capponi
07.27.2014 9d1bd29ee527b598f0e91a9d02920eaacb3f767d
opends/tests/unit-tests-testng/src/server/org/opends/server/replication/DependencyTest.java
@@ -22,10 +22,13 @@
 *
 *
 *      Copyright 2007-2010 Sun Microsystems, Inc.
 *      Portions Copyright 2011-2013 ForgeRock AS
 *      Portions Copyright 2011-2014 ForgeRock AS
 */
package org.opends.server.replication;
import static org.opends.server.TestCaseUtils.*;
import static org.testng.Assert.*;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.LinkedList;
@@ -46,13 +49,14 @@
import org.opends.server.replication.server.ReplServerFakeConfiguration;
import org.opends.server.replication.server.ReplicationServer;
import org.opends.server.replication.service.ReplicationBroker;
import org.opends.server.types.*;
import org.opends.server.types.AttributeType;
import org.opends.server.types.AttributeValue;
import org.opends.server.types.Attributes;
import org.opends.server.types.DN;
import org.opends.server.types.Entry;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import static org.opends.server.TestCaseUtils.*;
import static org.testng.Assert.*;
/**
 * Test that the dependencies are computed correctly when replaying
 * sequences of operations that requires to follow a given order
@@ -71,7 +75,7 @@
  {
     TEST_ROOT_DN = DN.decode(TEST_ROOT_DN_STRING);
  }
  /**
   * Check that a sequence of dependents adds and mods is correctly ordered:
   * Using a deep dit :
@@ -131,8 +135,8 @@
      ReplServerFakeConfiguration conf =
        new ReplServerFakeConfiguration(replServerPort, "dependencyTestAddModDelDependencyTestDb",
                                        0, replServerId, 0,
                                        AddSequenceLength*5+100, null);
                                        replicationDbImplementation, 0, replServerId,
                                        0, AddSequenceLength*5+100, null);
      replServer = new ReplicationServer(conf);
      ReplicationBroker broker = openReplicationSession(
@@ -267,8 +271,8 @@
      ReplServerFakeConfiguration conf =
        new ReplServerFakeConfiguration(replServerPort, "dependencyTestModdnDelDependencyTestDb",
                                        0, replServerId, 0,
                                        200, null);
                                        replicationDbImplementation, 0, replServerId,
                                        0, 200, null);
      replServer = new ReplicationServer(conf);
      // configure and start replication of TEST_ROOT_DN_STRING on the server
@@ -398,9 +402,8 @@
      int replServerPort = TestCaseUtils.findFreePort();
      ReplServerFakeConfiguration conf =
        new ReplServerFakeConfiguration(replServerPort, "dependencyTestAddDelAddDependencyTestDb", 0,
                                        replServerId,
                                        0, 5*AddSequenceLength+100, null);
        new ReplServerFakeConfiguration(replServerPort, "dependencyTestAddDelAddDependencyTestDb", replicationDbImplementation,
                                        0, replServerId, 0, 5*AddSequenceLength+100, null);
      replServer = new ReplicationServer(conf);
      ReplicationBroker broker = openReplicationSession(
@@ -517,9 +520,8 @@
      int replServerPort = TestCaseUtils.findFreePort();
      ReplServerFakeConfiguration conf =
        new ReplServerFakeConfiguration(replServerPort, "dependencyTestAddModdnDependencyTestDb", 0,
                                        replServerId,
                                        0, 5*AddSequenceLength+100, null);
        new ReplServerFakeConfiguration(replServerPort, "dependencyTestAddModdnDependencyTestDb", replicationDbImplementation,
                                        0, replServerId, 0, 5*AddSequenceLength+100, null);
      replServer = new ReplicationServer(conf);
      ReplicationBroker broker = openReplicationSession(