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

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


The following commit(s) were added to refs/heads/main by this push:
     new ce5bd6f0e9 adds debug to waits in FatePoolsWatcherITBase (#5819)
ce5bd6f0e9 is described below

commit ce5bd6f0e9c11a9f585e1725443e7051605530e7
Author: Keith Turner <[email protected]>
AuthorDate: Fri Aug 22 14:19:31 2025 -0400

    adds debug to waits in FatePoolsWatcherITBase (#5819)
    
    These changes are related to :
    
    https://github.com/apache/accumulo/pull/5813#issuecomment-3214328197
---
 .../accumulo/test/fate/FatePoolsWatcherITBase.java | 35 ++++++++++++++++++----
 1 file changed, 29 insertions(+), 6 deletions(-)

diff --git 
a/test/src/main/java/org/apache/accumulo/test/fate/FatePoolsWatcherITBase.java 
b/test/src/main/java/org/apache/accumulo/test/fate/FatePoolsWatcherITBase.java
index cc7b93b5bd..9a562a7c76 100644
--- 
a/test/src/main/java/org/apache/accumulo/test/fate/FatePoolsWatcherITBase.java
+++ 
b/test/src/main/java/org/apache/accumulo/test/fate/FatePoolsWatcherITBase.java
@@ -117,6 +117,12 @@ public abstract class FatePoolsWatcherITBase extends 
SharedMiniClusterBase
 
       // wait for the FateExecutors to work on the transactions
       Wait.waitFor(() -> env.numWorkers.get() == 2);
+      Wait.waitFor(() -> {
+        final int count = env.numWorkers.get();
+        final int goal = 2;
+        log.debug("Waiting for test workers {} to reach goal {}", count, goal);
+        return count == goal;
+      });
       // sum has been verified, verify each term
       Map<Fate.FateOperation,
           Long> seenCounts = store.list()
@@ -128,7 +134,12 @@ public abstract class FatePoolsWatcherITBase extends 
SharedMiniClusterBase
       assertEquals(expectedCounts, seenCounts);
 
       // wait for all transaction runners to be active
-      Wait.waitFor(() -> fate.getTotalTxRunnersActive() == numWorkersSet1 + 
numWorkersSet2);
+      Wait.waitFor(() -> {
+        final int sum = fate.getTotalTxRunnersActive();
+        final int goal = numWorkersSet1 + numWorkersSet2;
+        log.debug("Waiting for fate workers {} to reach goal {}", sum, goal);
+        return sum == goal;
+      });
       // sum has been verified, verify each term
       assertEquals(numWorkersSet1, fate.getTxRunnersActive(set1));
       assertEquals(numWorkersSet2, fate.getTxRunnersActive(set2));
@@ -137,8 +148,12 @@ public abstract class FatePoolsWatcherITBase extends 
SharedMiniClusterBase
 
       // After changing the config, the fate pool watcher should detect the 
change and increase the
       // pool size for the pool assigned to work on SET1
-      Wait.waitFor(() -> fate.getTotalTxRunnersActive()
-          == newNumWorkersSet1 + 1 + numWorkersSet3 + numWorkersSet4);
+      Wait.waitFor(() -> {
+        final int sum = fate.getTotalTxRunnersActive();
+        final int goal = newNumWorkersSet1 + 1 + numWorkersSet3 + 
numWorkersSet4;
+        log.debug("Waiting for fate workers {} to reach goal {}", sum, goal);
+        return sum == goal;
+      });
       // sum has been verified, verify each term
       assertEquals(newNumWorkersSet1, fate.getTxRunnersActive(set1));
       // The FateExecutor assigned to SET2 is no longer valid after the config 
change, so a
@@ -163,11 +178,19 @@ public abstract class FatePoolsWatcherITBase extends 
SharedMiniClusterBase
       // finish work
       env.isReadyLatch.countDown();
 
-      Wait.waitFor(() -> env.numWorkers.get() == 0);
+      Wait.waitFor(() -> {
+        final int count = env.numWorkers.get();
+        log.debug("Waiting for test workers {} to reach goal 0", count);
+        return count == 0;
+      });
 
       // workers should still be running: we haven't shutdown FATE, just not 
working on anything
-      Wait.waitFor(() -> fate.getTotalTxRunnersActive()
-          == newNumWorkersSet1 + numWorkersSet3 + numWorkersSet4);
+      Wait.waitFor(() -> {
+        final int sum = fate.getTotalTxRunnersActive();
+        final int goal = newNumWorkersSet1 + numWorkersSet3 + numWorkersSet4;
+        log.debug("Waiting for fate workers {} to reach goal {}", sum, goal);
+        return sum == goal;
+      });
       // sum has been verified, verify each term
       assertEquals(newNumWorkersSet1, fate.getTxRunnersActive(set1));
       // The FateExecutor for SET2 should have finished work and be shutdown 
now since it was

Reply via email to