From 60d369bef9c0f25c68bedd847efb3d8e937362a5 Mon Sep 17 00:00:00 2001
From: gbellato <gbellato@localhost>
Date: Mon, 19 Jan 2009 15:09:08 +0000
Subject: [PATCH] Fix for Replication namingConflict test failing when running slow tests
---
opends/tests/unit-tests-testng/src/server/org/opends/server/replication/UpdateOperationTest.java | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/UpdateOperationTest.java b/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/UpdateOperationTest.java
index a7db448..0e3fb88 100644
--- a/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/UpdateOperationTest.java
+++ b/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/UpdateOperationTest.java
@@ -65,6 +65,7 @@
import org.opends.server.replication.protocol.HeartbeatThread;
import org.opends.server.replication.protocol.ModifyDNMsg;
import org.opends.server.replication.protocol.ModifyMsg;
+import org.opends.server.replication.protocol.OperationContext;
import org.opends.server.replication.protocol.ReplicationMsg;
import org.opends.server.schema.DirectoryStringSyntax;
import org.opends.server.types.Attribute;
@@ -278,7 +279,7 @@
* Add an entry in the database
*
*/
- private void addEntry(Entry entry) throws Exception
+ private ChangeNumber addEntry(Entry entry) throws Exception
{
AddOperationBasis addOp = new AddOperationBasis(connection,
InternalClientConnection.nextOperationID(), InternalClientConnection
@@ -289,6 +290,7 @@
assertEquals(addOp.getResultCode(), ResultCode.SUCCESS);
assertNotNull(getEntry(entry.getDN(), 1000, true));
+ return OperationContext.getChangeNumber((Operation) addOp);
}
/**
@@ -1168,6 +1170,7 @@
delEntry(conflictDomain2dn);
delEntry(conflictDomain3dn);
+
//
// Check that when a delete is replayed over an entry which has child
// those child are also deleted
@@ -1177,7 +1180,8 @@
domain1uid = getEntryUUID(DN.decode(domain1dn));
addEntry(domain2);
domain2uid = getEntryUUID(DN.decode(domain2dn));
- addEntry(domain3);
+ ChangeNumber addCn = addEntry(domain3);
+ gen.adjust(addCn);
domain3uid = getEntryUUID(DN.decode(domain3dn));
updateMonitorCount(baseDn, unresolvedMonitorAttr);
@@ -1192,10 +1196,10 @@
"The DELETE replication message was not replayed");
// check that domain2 and domain3 have not been renamed as conflicting
- assertNull(getEntry(conflictDomain2dn, 1000, true),
- "The conflicting entries were not created");
- assertNull(getEntry(conflictDomain3dn, 1000, true),
- "The conflicting entries were not created");
+ assertNull(getEntry(conflictDomain2dn, 10000, true),
+ "The conflicting entries were created");
+ assertNull(getEntry(conflictDomain3dn, 10000, true),
+ "The conflicting entries were created");
//
--
Gitblit v1.10.0