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/replication/plugin/StateMachineTest.java |   12 +++++-------
 1 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/StateMachineTest.java b/opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/StateMachineTest.java
index 76bcb13..c899e16 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/StateMachineTest.java
+++ b/opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/StateMachineTest.java
@@ -26,7 +26,6 @@
 import java.net.SocketTimeoutException;
 import java.util.SortedSet;
 import java.util.TreeSet;
-import java.util.concurrent.Callable;
 import java.util.concurrent.atomic.AtomicBoolean;
 
 import org.forgerock.i18n.LocalizableMessage;
@@ -56,6 +55,7 @@
 import org.opends.server.replication.service.ReplicationBroker;
 import org.opends.server.types.Entry;
 import org.opends.server.util.TestTimer;
+import org.opends.server.util.TestTimer.CallableVoid;
 import org.testng.annotations.AfterClass;
 import org.testng.annotations.BeforeClass;
 import org.testng.annotations.DataProvider;
@@ -143,13 +143,12 @@
       .maxSleep(30, 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
       {
         assertTrue(isConnected(dsId), "checkConnection: DS " + dsId + " is not connected to the RS");
-        return null;
       }
     });
   }
@@ -1130,13 +1129,12 @@
       .maxSleep(30, SECONDS)
       .sleepTimes(500, MILLISECONDS)
       .toTimer();
-    timer.repeatUntilSuccess(new Callable<Void>()
+    timer.repeatUntilSuccess(new CallableVoid()
     {
       @Override
-      public Void call() throws Exception
+      public void call() throws Exception
       {
         assertEquals(domain.getStatus(), expectedStatus);
-        return null;
       }
     });
   }

--
Gitblit v1.10.0