aboutsummaryrefslogtreecommitdiffstats
path: root/feature-server-pool/src
diff options
context:
space:
mode:
Diffstat (limited to 'feature-server-pool/src')
-rw-r--r--feature-server-pool/src/test/java/org/onap/policy/drools/serverpool/AdapterImpl.java2
-rw-r--r--feature-server-pool/src/test/java/org/onap/policy/drools/serverpooltest/Test1.java4
2 files changed, 2 insertions, 4 deletions
diff --git a/feature-server-pool/src/test/java/org/onap/policy/drools/serverpool/AdapterImpl.java b/feature-server-pool/src/test/java/org/onap/policy/drools/serverpool/AdapterImpl.java
index 789dfe61..044067a3 100644
--- a/feature-server-pool/src/test/java/org/onap/policy/drools/serverpool/AdapterImpl.java
+++ b/feature-server-pool/src/test/java/org/onap/policy/drools/serverpool/AdapterImpl.java
@@ -175,7 +175,7 @@ public class AdapterImpl extends Adapter {
for (int i = 0; i < Bucket.BUCKETCOUNT; i += 1) {
Bucket bucket = Bucket.getBucket(i);
while (bucket.getOwner() == null) {
- Thread.sleep(Math.min(endTime - System.currentTimeMillis(), 100L));
+ await().atMost(Math.min(endTime - System.currentTimeMillis(), 100L), TimeUnit.MILLISECONDS);
}
}
} catch (IllegalArgumentException e) {
diff --git a/feature-server-pool/src/test/java/org/onap/policy/drools/serverpooltest/Test1.java b/feature-server-pool/src/test/java/org/onap/policy/drools/serverpooltest/Test1.java
index 436cf77f..fe525788 100644
--- a/feature-server-pool/src/test/java/org/onap/policy/drools/serverpooltest/Test1.java
+++ b/feature-server-pool/src/test/java/org/onap/policy/drools/serverpooltest/Test1.java
@@ -181,9 +181,7 @@ public class Test1 {
UUID leaderUuid = firstAdapter.getLeader().getUuid();
for (Adapter adapter : Adapter.adapters) {
UUID uuid = adapter.getLeader().getUuid();
- assertTrue(adapter.toString() + " has UUID " + uuid
- + " (expected UUID " + leaderUuid + ")",
- uuid.equals(leaderUuid));
+ assertEquals(adapter.toString(), leaderUuid, uuid);
}
}