kgusakov commented on code in PR #5064:
URL: https://github.com/apache/ignite-3/pull/5064#discussion_r1927017660
##########
modules/table/src/integrationTest/java/org/apache/ignite/internal/table/distributed/disaster/AbstractHighAvailablePartitionsRecoveryTest.java:
##########
@@ -132,10 +142,87 @@ private void
waitAndAssertStableAssignmentsOfPartitionEqualTo(
.collect(Collectors.toUnmodifiableSet()));
}
+ /**
+ * Wait for the 2 facts simultaneously.
+ *
+ * <ul>
+ * <li>All planned rebalances have finished (pending and planned keys
is empty).</li>
+ * <li>Stable assignments is equal to expected</li>
+ * </ul>
+ *
+ * @param gatewayNode Node for communication with cluster and components.
+ * @param tableName Table name.
+ * @param partitionIds Set of target partition ids to check.
+ * @param nodes Expected set of nodes in stable assignments.
+ */
+ final void
waitThatAllRebalancesHaveFinishedAndStableAssignmentsEqualsToExpected(
+ IgniteImpl gatewayNode, String tableName, Set<Integer>
partitionIds, Set<String> nodes) {
+ partitionIds.forEach(p -> {
+ try {
+
waitThatAllRebalancesHaveFinishedAndStableAssignmentsEqualsToExpected(gatewayNode,
tableName, p, nodes);
+ } catch (InterruptedException e) {
+ throw new RuntimeException(e);
+ }
+ });
+ }
+
+ /**
+ * The same as the previous one, but for concrete partition.
Review Comment:
Check this solution pls
https://github.com/apache/ignite-3/pull/5064/commits/5ae9304e28d380241f78e8d330bc26a73e91d1dd
--
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]