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


##########
modules/runner/src/testFixtures/java/org/apache/ignite/internal/ClusterPerClassIntegrationTest.java:
##########
@@ -209,6 +218,45 @@ protected static void dropAllTables() {
         }
     }
 
+    /**
+     * Waits for the specified partitionIds 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  partitionIds The specified set of partitions.
+     * @throws InterruptedException If the thread is interrupted while waiting.
+     * @throws AssertionError If partitionIds do not become healthy within the 
timeout period.
+     */
+    protected static void awaitPartitionsToBeHealthy(
+            String zone,
+            String tableName,
+            Set<Integer> partitionIds) throws InterruptedException {
+        assertTrue(waitForCondition(() -> CLUSTER.runningNodes().count() == 
CLUSTER.nodes().size(), 10_000));
+        IgniteImpl node = unwrapIgniteImpl(CLUSTER.aliveNode());
+
+        assertTrue(waitForCondition(() -> {
+                    CompletableFuture<Map<TablePartitionId, 
GlobalTablePartitionState>> globalTablePartitionStates =
+                            
node.disasterRecoveryManager().globalTablePartitionStates(Set.of(zone), 
partitionIds);

Review Comment:
   BTW, I believe that it's better to use globalPartitionStates() (which is 
actually globalZonePartitionStates()) instead of global**Table**PartitionStates.



-- 
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