From 867b7e0b56ee784f04c9a02298216a3c8f946005 Mon Sep 17 00:00:00 2001
From: Jean-Noël Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Wed, 02 Nov 2016 15:53:49 +0000
Subject: [PATCH] TestTimer.java: Added repeatUntilSuccess(CallableVoid callable)

---
 opendj-server-legacy/src/test/java/org/opends/server/backends/ChangelogBackendTestCase.java |   12 +++++-------
 1 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/opendj-server-legacy/src/test/java/org/opends/server/backends/ChangelogBackendTestCase.java b/opendj-server-legacy/src/test/java/org/opends/server/backends/ChangelogBackendTestCase.java
index 39b369e..a3e5414 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/backends/ChangelogBackendTestCase.java
+++ b/opendj-server-legacy/src/test/java/org/opends/server/backends/ChangelogBackendTestCase.java
@@ -29,7 +29,6 @@
 import static org.opends.server.util.CollectionUtils.*;
 import static org.opends.server.util.ServerConstants.*;
 import static org.opends.server.util.StaticUtils.*;
-import static org.opends.server.util.TestTimer.*;
 import static org.testng.Assert.*;
 
 import java.io.ByteArrayOutputStream;
@@ -103,6 +102,7 @@
 import org.opends.server.types.SearchResultEntry;
 import org.opends.server.util.LDIFWriter;
 import org.opends.server.util.TestTimer;
+import org.opends.server.util.TestTimer.CallableVoid;
 import org.opends.server.util.TimeThread;
 import org.opends.server.workflowelement.localbackend.LocalBackendModifyDNOperation;
 import org.testng.annotations.AfterClass;
@@ -482,10 +482,10 @@
       .maxSleep(3, SECONDS)
       .sleepTimes(100, MILLISECONDS)
       .toTimer();
-    timer.repeatUntilSuccess(new Callable<Void>()
+    timer.repeatUntilSuccess(new CallableVoid()
     {
       @Override
-      public Void call() throws Exception
+      public void call() throws Exception
       {
         final ReplicationDomainDB domainDB = replicationServer.getChangelogDB().getReplicationDomainDB();
         CursorOptions options = new CursorOptions(GREATER_THAN_OR_EQUAL_TO_KEY, ON_MATCHING_KEY);
@@ -494,7 +494,6 @@
         {
           assertTrue(cursor.next(), "Expected to find at least one change in replicaDB for " + replicaId);
           assertEquals(cursor.getRecord().getCSN(), csn);
-          return END_RUN;
         }
       }
     });
@@ -1241,13 +1240,12 @@
       .maxSleep(500, MILLISECONDS)
       .sleepTimes(50, MILLISECONDS)
       .toTimer();
-    timer.repeatUntilSuccess(new Callable<Void>()
+    timer.repeatUntilSuccess(new CallableVoid()
     {
       @Override
-      public Void call() throws Exception
+      public void call() throws Exception
       {
         assertEquals(operation.getResultCode(), expectedResult, operation.getErrorMessage().toString());
-        return END_RUN;
       }
     });
   }

--
Gitblit v1.10.0