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

Jean-Noel Rouvignac
02.57.2013 157717b205d4c1f957cf810e04e06f11530c619c
opends/tests/unit-tests-testng/src/server/org/opends/server/replication/plugin/HistoricalTest.java
@@ -36,7 +36,7 @@
import org.opends.server.protocols.internal.InternalSearchOperation;
import org.opends.server.protocols.ldap.LDAPFilter;
import org.opends.server.replication.ReplicationTestCase;
import org.opends.server.replication.common.ChangeNumber;
import org.opends.server.replication.common.CSN;
import org.opends.server.replication.protocol.AddMsg;
import org.opends.server.replication.protocol.LDAPUpdateMsg;
import org.opends.server.replication.protocol.ModifyMsg;
@@ -55,9 +55,9 @@
 * Tests the Historical class.
 */
@SuppressWarnings("javadoc")
public class HistoricalTest
     extends ReplicationTestCase
public class HistoricalTest extends ReplicationTestCase
{
  private int replServerPort;
  private String testName = "historicalTest";
@@ -288,10 +288,10 @@
    long now = System.currentTimeMillis();
    // A change on a first server.
    ChangeNumber t1 = new ChangeNumber(now,  0,  3);
    CSN t1 = new CSN(now,  0,  3);
    // A change on a second server.
    ChangeNumber t2 = new ChangeNumber(now+1,  0,  4);
    CSN t2 = new CSN(now+1,  0,  4);
    // Simulate the ordering t1:add:A followed by t2:add:B that would
    // happen on one server.
@@ -316,8 +316,8 @@
    // Simulate the reverse ordering t2:add:B followed by t1:add:A that
    // would happen on the other server.
    t1 = new ChangeNumber(now+3,  0,  3);
    t2 = new ChangeNumber(now+4,  0,  4);
    t1 = new CSN(now+3,  0,  3);
    t2 = new CSN(now+4,  0,  4);
    // Replay an add of a value B at time t2 on a second server.
    attr = Attributes.create(attrType.getNormalizedPrimaryName(), "B");
@@ -354,7 +354,7 @@
}
  private static
  void publishModify(ReplicationBroker broker, ChangeNumber changeNum,
  void publishModify(ReplicationBroker broker, CSN changeNum,
                     DN dn, String entryuuid, Modification mod)
  {
    List<Modification> mods = new ArrayList<Modification>(1);
@@ -473,7 +473,7 @@
        // - the dn should be dn1,
        // - the entry id and the parent id should match the ids from the entry
        FakeAddOperation addOp = (FakeAddOperation) op;
        assertTrue(addOp.getChangeNumber() != null);
        assertTrue(addOp.getCSN() != null);
        AddMsg addmsg = addOp.generateMessage();
        assertTrue(dn1.equals(DN.decode(addmsg.getDn())));
        assertTrue(addmsg.getEntryUUID().equals(EntryHistorical.getEntryUUID(entry)));
@@ -503,7 +503,7 @@
   *
   * TODO: another test should be written that configures the task no NOT have
   * the time to purge everything in 1 run .. and thus to relauch it to finish
   * the purge. And verify that the second run starts on the changeNumber where
   * the purge. And verify that the second run starts on the CSN where
   * the previous task run had stopped.
   */
  @Test(enabled=true)