From 6b5455aba72709fb4d3841acfd8241508a6f620e Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Thu, 03 Oct 2013 09:21:15 +0000
Subject: [PATCH] Maybe the end of endless pain and suffering on the Continuous Integration front - take 2.
---
opends/tests/unit-tests-testng/src/server/org/opends/server/replication/server/ExternalChangeLogTest.java | 17 +++--------------
1 files changed, 3 insertions(+), 14 deletions(-)
diff --git a/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/server/ExternalChangeLogTest.java b/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/server/ExternalChangeLogTest.java
index ff22158..6518ce1 100644
--- a/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/server/ExternalChangeLogTest.java
+++ b/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/server/ExternalChangeLogTest.java
@@ -831,9 +831,7 @@
assertEquals(searchOp.getSearchEntries().size(), 0);
String expectedError = ERR_RESYNC_REQUIRED_MISSING_DOMAIN_IN_PROVIDED_COOKIE
.get("o=test:;","<"+ newCookie + "o=test:;>").toString();
- assertTrue(searchOp.getErrorMessage().toString().equalsIgnoreCase(expectedError),
- "Expected: " + expectedError + "Server output:" +
- searchOp.getErrorMessage());
+ assertThat(searchOp.getErrorMessage().toString()).isEqualToIgnoringCase(expectedError);
}
finally
{
@@ -942,7 +940,6 @@
debugInfo(tn, "Starting test");
ReplicationBroker server01 = null;
-
try
{
// ---
@@ -952,7 +949,7 @@
server01 = openReplicationSession(TEST_ROOT_DN, SERVER_ID_1,
100, replicationServerPort, brokerSessionTimeout, true);
- final CSN[] csns = generateCSNs(4, SERVER_ID_1);
+ final CSN[] csns = generateCSNs(3, SERVER_ID_1);
publishDeleteMsgInOTest(server01, csns[0], tn, 1);
Thread.sleep(1000);
@@ -964,9 +961,6 @@
publishDeleteMsgInOTest(server01, csns[1], tn, 2);
publishDeleteMsgInOTest(server01, csns[2], tn, 3);
- // Sleep longer than this delay - the changelog will be trimmed
- Thread.sleep(1000);
-
// ---
// 2. Now set up a very short purge delay on the replication changelogs
// so that this test can play with a trimmed changelog.
@@ -987,6 +981,7 @@
assertThat(entries).hasSize(0);
debugAndWriteEntries(ldifWriter, entries, tn);
+ // ---
// 4. Assert that a request with the current last cookie returns nothing
cookie = readLastCookie();
debugInfo(tn, "2. Search with last cookie=" + cookie + "\"");
@@ -997,13 +992,10 @@
assertThat(entries).hasSize(0);
debugAndWriteEntries(ldifWriter, entries, tn);
-
// ---
// 5. Assert that a request with an "old" cookie - one that refers to
// changes that have been removed by the replication changelog trimming
// returns the appropriate error.
- publishDeleteMsgInOTest(server01, csns[3], tn, 1);
-
debugInfo(tn, "d1 trimdate" + getReplicationDomainStartState(TEST_ROOT_DN));
debugInfo(tn, "d2 trimdate" + getReplicationDomainStartState(TEST_ROOT_DN2));
searchOp = searchOnCookieChangelog("(targetDN=*)", cookieNotEmpty, tn, UNWILLING_TO_PERFORM);
@@ -1015,9 +1007,6 @@
finally
{
stop(server01);
- // lets clear the last "changeType: delete" from the changelogDB
- // it is failing to do it on slower machines
- clearChangelogDB(replicationServer);
// And reset changelog purge delay for the other tests.
replicationServer.getChangelogDB().setPurgeDelay(15 * 1000);
}
--
Gitblit v1.10.0