From 65cf071e6e7a15eb81c7d8f9fa2984c9de74b10e Mon Sep 17 00:00:00 2001
From: ludovicp <ludovicp@localhost>
Date: Fri, 25 Jun 2010 09:47:13 +0000
Subject: [PATCH] This fix resolves an issue with replication between Windows and Unix systems. The GenerationID was different on the systems for the same input due to differences in line separators and an inappropriate exception handling.
---
opends/tests/unit-tests-testng/src/server/org/opends/server/replication/ReplicationTestCase.java | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/ReplicationTestCase.java b/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/ReplicationTestCase.java
index b6f3067..9e46222 100644
--- a/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/ReplicationTestCase.java
+++ b/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/ReplicationTestCase.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Copyright 2006-2009 Sun Microsystems, Inc.
+ * Copyright 2006-2010 Sun Microsystems, Inc.
*/
package org.opends.server.replication;
@@ -61,6 +61,7 @@
import org.opends.server.protocols.internal.InternalSearchOperation;
import org.opends.server.protocols.ldap.LDAPFilter;
import org.opends.server.replication.common.ServerState;
+import org.opends.server.replication.plugin.GenerationIdChecksum;
import org.opends.server.replication.plugin.LDAPReplicationDomain;
import org.opends.server.replication.plugin.MultimasterReplication;
import org.opends.server.replication.plugin.PersistentServerState;
@@ -106,12 +107,12 @@
// This matches the backend obtained calling:
// TestCaseUtils.initializeTestBackend(true).
// (using the default TestCaseUtils.TEST_ROOT_DN_STRING suffix)
- protected static final long TEST_DN_WITH_ROOT_ENTRY_GENID = 5095L;
+ protected static final long TEST_DN_WITH_ROOT_ENTRY_GENID = 5055L;
/**
* Generation id for a fully empty domain.
*/
- public static final long EMPTY_DN_GENID = 48L;
+ public static final long EMPTY_DN_GENID = GenerationIdChecksum.EMPTY_BACKEND_GENERATION_ID;
/**
* The internal connection used for operation
@@ -188,7 +189,8 @@
/**
* Retrieves the domain associated to the baseDn, and the value of the generationId
* of this domain. If the domain does not exist, returns the default hard-coded\
- * value of the generationId corresponding to 'no entry'.
+ * value of the generationId corresponding to test backend with its default
+ * initial o=test root root entry.
*
* @param baseDn The baseDn for which we want the generationId
* @return The value of the generationId.
--
Gitblit v1.10.0