From c739ae5e9f212fe6806d06b8bee5da0956991ce3 Mon Sep 17 00:00:00 2001
From: ludovicp <ludovicp@localhost>
Date: Mon, 07 Jun 2010 11:47:07 +0000
Subject: [PATCH] Fix a regression in NamingConflict test introduce by revision 6498
---
opends/tests/unit-tests-testng/src/server/org/opends/server/replication/UpdateOperationTest.java | 26 +++++++++++++-------------
opends/src/server/org/opends/server/replication/plugin/LDAPReplicationDomain.java | 4 ++++
2 files changed, 17 insertions(+), 13 deletions(-)
diff --git a/opends/src/server/org/opends/server/replication/plugin/LDAPReplicationDomain.java b/opends/src/server/org/opends/server/replication/plugin/LDAPReplicationDomain.java
index 3b45c55..513e014 100644
--- a/opends/src/server/org/opends/server/replication/plugin/LDAPReplicationDomain.java
+++ b/opends/src/server/org/opends/server/replication/plugin/LDAPReplicationDomain.java
@@ -3374,6 +3374,10 @@
*/
private void renameConflictEntry(Operation conflictOp, DN dn, String uid)
{
+ Message alertMessage = NOTE_UNRESOLVED_CONFLICT.get(dn.toString());
+ DirectoryServer.sendAlertNotification(this,
+ ALERT_TYPE_REPLICATION_UNRESOLVED_CONFLICT, alertMessage);
+
ModifyDNOperation newOp =
renameEntry(dn, generateDeleteConflictDn(uid, dn), baseDn, true);
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 b26d5ca..5cfa62e 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
@@ -992,17 +992,6 @@
// delete the entries to clean the database
delMsg =
- new DeleteMsg("uid=reallynewrdn,ou=People," + TEST_ROOT_DN_STRING,
- gen.newChangeNumber(), user1entryUUID);
- broker.publish(delMsg);
- resultEntry = getEntry(
- DN.decode("uid=reallynewrdn,ou=People," + TEST_ROOT_DN_STRING), 10000, false);
-
- // check that the delete operation has been applied
- assertNull(resultEntry,
- "The DELETE replication message was not replayed");
-
- delMsg =
new DeleteMsg("entryUUID = " + user1entrysecondUUID + "+" +
DN.decode(user1dn).getRDN().toString() +
",ou=People," + TEST_ROOT_DN_STRING,
@@ -1017,6 +1006,17 @@
assertNull(resultEntry,
"The DELETE replication message was not replayed");
+ delMsg =
+ new DeleteMsg("uid=reallynewrdn,ou=People," + TEST_ROOT_DN_STRING,
+ gen.newChangeNumber(), user1entryUUID);
+ broker.publish(delMsg);
+ resultEntry = getEntry(
+ DN.decode("uid=reallynewrdn,ou=People," + TEST_ROOT_DN_STRING), 10000, false);
+
+ // check that the delete operation has been applied
+ assertNull(resultEntry,
+ "The DELETE replication message was not replayed");
+
/*
* When replaying add operations it is possible that the parent entry has
* been renamed before and that another entry have taken the former dn of
@@ -1152,9 +1152,9 @@
// check that the 2 conflicting entries have been correctly marked
assertTrue(checkEntryHasAttribute(conflictDomain2dn,
- LDAPReplicationDomain.DS_SYNC_CONFLICT, domain1dn, 1000, true));
+ LDAPReplicationDomain.DS_SYNC_CONFLICT, domain2dn, 1000, true));
assertTrue(checkEntryHasAttribute(conflictDomain3dn,
- LDAPReplicationDomain.DS_SYNC_CONFLICT, domain1dn, 1000, true));
+ LDAPReplicationDomain.DS_SYNC_CONFLICT, domain3dn, 1000, true));
// check that unresolved conflict count has been incremented
assertEquals(getMonitorDelta(), 1);
--
Gitblit v1.10.0