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

jxue pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/helix.git


The following commit(s) were added to refs/heads/master by this push:
     new 8a49c53eb Add more logs to debug
8a49c53eb is described below

commit 8a49c53eb3a31b5436e6c8cc04877280e32ac46b
Author: Junkai Xue <[email protected]>
AuthorDate: Fri Mar 20 12:36:56 2026 -0700

    Add more logs to debug
---
 .../integration/rebalancer/TestInstanceOperation.java     | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git 
a/helix-core/src/test/java/org/apache/helix/integration/rebalancer/TestInstanceOperation.java
 
b/helix-core/src/test/java/org/apache/helix/integration/rebalancer/TestInstanceOperation.java
index d73d3bb47..34cd734ff 100644
--- 
a/helix-core/src/test/java/org/apache/helix/integration/rebalancer/TestInstanceOperation.java
+++ 
b/helix-core/src/test/java/org/apache/helix/integration/rebalancer/TestInstanceOperation.java
@@ -264,9 +264,20 @@ public class TestInstanceOperation extends ZkTestBase {
     LOG.info("removeOfflineOrInactiveInstances: Removed {} instances. 
Remaining participants: {}",
         removedCount, _participantNames);
 
+    // Log cluster state before verifyByPolling to help diagnose failures
+    LOG.info("removeOfflineOrInactiveInstances: Checking cluster state before 
verifyByPolling...");
+    try {
+      Object leaderController = 
org.apache.helix.controller.GenericHelixController.getLeaderController(CLUSTER_NAME);
+      LOG.info("removeOfflineOrInactiveInstances: Controller leader for {} is: 
{}", CLUSTER_NAME, leaderController);
+    } catch (Exception e) {
+      LOG.warn("removeOfflineOrInactiveInstances: Failed to check controller: 
{}", e.getMessage());
+    }
+
     long verifyStart = System.currentTimeMillis();
-    Assert.assertTrue(_clusterVerifier.verifyByPolling());
-    LOG.info("removeOfflineOrInactiveInstances: verifyByPolling took {} ms", 
System.currentTimeMillis() - verifyStart);
+    boolean verifyResult = _clusterVerifier.verifyByPolling(600000, 5000); // 
10 min timeout for better diagnostics
+    long verifyDuration = System.currentTimeMillis() - verifyStart;
+    LOG.info("removeOfflineOrInactiveInstances: verifyByPolling took {} ms and 
returned {}", verifyDuration, verifyResult);
+    Assert.assertTrue(verifyResult, "Cluster verification failed after " + 
verifyDuration + "ms. Check logs above for cluster state.");
   }
 
   @Test

Reply via email to