sanpwc commented on code in PR #6843:
URL: https://github.com/apache/ignite-3/pull/6843#discussion_r2480899788


##########
modules/runner/src/testFixtures/java/org/apache/ignite/internal/ClusterPerClassIntegrationTest.java:
##########
@@ -184,6 +194,44 @@ protected String getNodeBootstrapConfigTemplate() {
         return NODE_BOOTSTRAP_CFG_TEMPLATE;
     }
 
+    /**
+     * Waits for all partitions in the specified zone to reach the HEALTHY 
state across all cluster nodes.
+     *
+     * @param zone The name of the distribution zone to check.
+     * @param tableName The name of the table (currently unused by the 
implementation, reserved for future use).
+     * @param partitionsCount The number of partitions to check (currently 
unused by the implementation, reserved for future use).
+     * @throws InterruptedException If the thread is interrupted while waiting.
+     * @throws AssertionError If partitions do not become healthy within the 
timeout period.
+     */
+    protected void awaitPartitionToBeHealthy(String zone, String tableName, 
int partitionsCount) throws InterruptedException {
+        assertTrue(waitForCondition(() -> CLUSTER.runningNodes().count() == 
initialNodes(), 10_000));

Review Comment:
   It's not generic. I mean that `awaitPartitionToBeHealthy()` might be called 
at any time during the life of the cluster. In that case 
`CLUSTER.runningNodes().count() == initialNodes()` might not match because:
   
   1. We may add more nodes in addition to initialNodes().
   2. We may remove nodes, without touching partition ones. I mean that there 
are 3 nodes in cluster [A,B,C], partition assignments is [A,B] though. In that 
case we do not really care about node C, right?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to