You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by do...@apache.org on 2023/02/03 18:09:32 UTC

[accumulo] branch 2.1 updated: Fix usage of Wait.waitFor() in ITs (#3186)

This is an automated email from the ASF dual-hosted git repository.

domgarguilo pushed a commit to branch 2.1
in repository https://gitbox.apache.org/repos/asf/accumulo.git


The following commit(s) were added to refs/heads/2.1 by this push:
     new 4528925def Fix usage of Wait.waitFor() in ITs (#3186)
4528925def is described below

commit 4528925defc7a61f0a97c3acfd1a90bd3c16e8e5
Author: Dom G <do...@apache.org>
AuthorDate: Fri Feb 3 13:09:26 2023 -0500

    Fix usage of Wait.waitFor() in ITs (#3186)
    
    Wrapped the usage of Wait.waitFor() in assertTrue within the tests.
---
 test/src/main/java/org/apache/accumulo/test/LargeSplitRowIT.java      | 4 +---
 .../java/org/apache/accumulo/test/functional/KerberosRenewalIT.java   | 3 ++-
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/test/src/main/java/org/apache/accumulo/test/LargeSplitRowIT.java b/test/src/main/java/org/apache/accumulo/test/LargeSplitRowIT.java
index 54424ba8e3..ea97f8263e 100644
--- a/test/src/main/java/org/apache/accumulo/test/LargeSplitRowIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/LargeSplitRowIT.java
@@ -235,9 +235,7 @@ public class LargeSplitRowIT extends ConfigurableMacBase {
       // Make sure a split occurs
       Wait.Condition splitsToBePresent =
           () -> client.tableOperations().listSplits(tableName).stream().findAny().isPresent();
-      Wait.waitFor(splitsToBePresent, SECONDS.toMillis(60L), 250L);
-
-      assertTrue(client.tableOperations().listSplits(tableName).stream().findAny().isPresent());
+      assertTrue(Wait.waitFor(splitsToBePresent, SECONDS.toMillis(60L), 250L));
     }
   }
 
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/KerberosRenewalIT.java b/test/src/main/java/org/apache/accumulo/test/functional/KerberosRenewalIT.java
index ab4e0d395c..804ece8b49 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/KerberosRenewalIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/KerberosRenewalIT.java
@@ -21,6 +21,7 @@ package org.apache.accumulo.test.functional;
 import static java.util.concurrent.TimeUnit.MINUTES;
 import static org.apache.accumulo.harness.AccumuloITBase.MINI_CLUSTER_ONLY;
 import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.time.Duration;
 import java.util.Map;
@@ -188,6 +189,6 @@ public class KerberosRenewalIT extends AccumuloITBase {
       assertEquals("d", entry.getValue().toString());
     }
     client.tableOperations().delete(tableName);
-    Wait.waitFor(() -> !client.tableOperations().exists(tableName), 20_000L, 200L);
+    assertTrue(Wait.waitFor(() -> !client.tableOperations().exists(tableName), 20_000L, 200L));
   }
 }