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/InitOnLineTest.java |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/InitOnLineTest.java b/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/InitOnLineTest.java
index 11c0dea..46b30bb 100644
--- a/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/InitOnLineTest.java
+++ b/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/InitOnLineTest.java
@@ -1019,21 +1019,24 @@
       makeBrokerPublishEntries(server2, server2ID, server1ID, server2ID);
 
       // wait until the replication domain has expected generationID
-      // this should indicate that the import occured correctly.
+      // this should indicate that the import occurred correctly.
+      final long EXPECTED_GENERATION_ID = 52955L;
+      long readGenerationId = -1L;
       for (int count = 0; count < 120; count++)
       {
-        if (replDomain.getGenerationID() == 53235)
+        readGenerationId = replDomain.getGenerationID();
+        if ( readGenerationId == EXPECTED_GENERATION_ID)
           break;
-        log(testCase + " genId=" + replDomain.getGenerationID());
+        log(testCase + " genId=" + readGenerationId);
         Thread.sleep(1000);
       }
 
-      if (replDomain.getGenerationID() != 53235)
+      if (readGenerationId != EXPECTED_GENERATION_ID)
       {
         fail(testCase + " Import success waited longer than expected \n" + 
             TestCaseUtils.threadStacksToString());
       }
-      
+
       // Test that entries have been imported in S1
       testEntriesInDb();
 

--
Gitblit v1.10.0