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/UpdateOperationTest.java | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/opendj-server-legacy/src/test/java/org/opends/server/replication/UpdateOperationTest.java b/opendj-server-legacy/src/test/java/org/opends/server/replication/UpdateOperationTest.java
index 9bd57ea..043acf6 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/replication/UpdateOperationTest.java
+++ b/opendj-server-legacy/src/test/java/org/opends/server/replication/UpdateOperationTest.java
@@ -30,7 +30,6 @@
import java.net.SocketTimeoutException;
import java.util.ArrayList;
import java.util.List;
-import java.util.concurrent.Callable;
import org.assertj.core.api.Assertions;
import org.forgerock.i18n.LocalizableMessage;
@@ -66,6 +65,7 @@
import org.opends.server.types.Operation;
import org.opends.server.types.OperationType;
import org.opends.server.util.TestTimer;
+import org.opends.server.util.TestTimer.CallableVoid;
import org.opends.server.util.TimeThread;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.DataProvider;
@@ -1047,13 +1047,12 @@
.maxSleep(200, 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
{
assertNotEquals(getMonitorDelta() , 0);
- return null;
}
});
}
@@ -1326,13 +1325,12 @@
.maxSleep(5, 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
{
assertNotEquals(getMonitorAttrValue(baseDN, "replayed-updates"), initialCount);
- return null;
}
});
}
--
Gitblit v1.10.0