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

Chris Ridd
01.38.2013 66ee9ca4d9bb420952cf080d6e32c5281ec7cb8b
Forgot to update 2 tests
1 files modified
18 ■■■■■ changed files
opends/tests/unit-tests-testng/src/server/org/opends/server/replication/plugin/ModifyConflictTest.java 18 ●●●●● patch | view | raw | blame | history
opends/tests/unit-tests-testng/src/server/org/opends/server/replication/plugin/ModifyConflictTest.java
@@ -86,12 +86,16 @@
    // load historical from the entry
    EntryHistorical hist = EntryHistorical.newInstanceFromEntry(entry);
    AttributeBuilder builder = new AttributeBuilder(SYNCHIST);
    builder.add(DESCRIPTION + ":000000000000000a000000000000:repl:init value");
    Attribute repl = builder.toAttribute();
    /*
     * simulate a modify-replace done at time t10
     */
    testModify(entry, hist, DESCRIPTION, ModificationType.REPLACE,
               "init value", 10, true);
    assertEquals(hist.encodeAndPurge(), repl);
    /*
     * Now simulate an add at an earlier date that the previous replace
@@ -99,6 +103,7 @@
     */
    testModify(entry, hist, DESCRIPTION, ModificationType.ADD,
               "older value", 1, false);
    assertEquals(hist.encodeAndPurge(), repl);
    /*
     * Now simulate an add at an earlier date that the previous replace
@@ -107,6 +112,7 @@
     */
    testModify(entry, hist, DESCRIPTION, ModificationType.ADD,
               "older value", 2, false);
    assertEquals(hist.encodeAndPurge(), repl);
    /*
     * Now simulate an add at a later date that the previous replace.
@@ -114,7 +120,10 @@
     */
    testModify(entry, hist, DESCRIPTION, ModificationType.ADD, "new value",
               11, true);
    builder = new AttributeBuilder(SYNCHIST);
    builder.add(DESCRIPTION + ":000000000000000a000000000000:repl:init value");
    builder.add(DESCRIPTION + ":000000000000000b000000000000:add:new value");
    assertEquals(hist.encodeAndPurge(), builder.toAttribute());
  }
  /**
@@ -128,12 +137,16 @@
    // load historical from the entry
    EntryHistorical hist = EntryHistorical.newInstanceFromEntry(entry);
    AttributeBuilder builder = new AttributeBuilder(SYNCHIST);
    builder.add(DISPLAYNAME + ":000000000000000a000000000000:repl:init value");
    Attribute repl = builder.toAttribute();
    /*
     * simulate a modify-replace done at time t10
     */
    testModify(entry, hist, DISPLAYNAME, ModificationType.REPLACE,
               "init value", 10, true);
    assertEquals(hist.encodeAndPurge(), repl);
    /*
     * Now simulate an add at an earlier date that the previous replace
@@ -141,6 +154,7 @@
     */
    testModify(entry, hist, DISPLAYNAME, ModificationType.ADD,
               "older value", 1, false);
    assertEquals(hist.encodeAndPurge(), repl);
    /*
     * Now simulate an add at an earlier date that the previous replace
@@ -149,6 +163,7 @@
     */
    testModify(entry, hist, DISPLAYNAME, ModificationType.ADD,
               "older value", 2, false);
    assertEquals(hist.encodeAndPurge(), repl);
    /*
     * Now simulate an add at a later date that the previous replace.
@@ -156,6 +171,7 @@
     */
    testModify(entry, hist, DISPLAYNAME, ModificationType.ADD, "new value",
               11, false);
    assertEquals(hist.encodeAndPurge(), repl);
    List<Attribute> attrs = entry.getAttribute(DISPLAYNAME);
    Attribute attr = attrs.get(0);