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


##########
modules/distribution-zones/src/test/java/org/apache/ignite/internal/distributionzones/DistributionZoneAwaitDataNodesTest.java:
##########
@@ -367,20 +377,30 @@ void testRemoveZoneWhileAwaitingDataNodes() throws 
Exception {
 
         CompletableFuture<Set<String>> dataNodesFut1 = 
distributionZoneManager.topologyVersionedDataNodes(zoneId, 106);
 
+        doAnswer(invocation -> {
+            If iif = invocation.getArgument(0);
+
+            byte[] key = zoneScaleUpChangeTriggerKey(zoneId).bytes();
+
+            if (Arrays.stream(iif.cond().keys()).anyMatch(k -> 
Arrays.equals(key, k))) {
+                //Drop the zone while dataNodesFut1 is awaiting a data nodes 
update.
+                distributionZoneManager.dropZone(zoneName).get();

Review Comment:
   It's better to bound future awaiting time either with `.get(3, SECONDS);` or 
with
   ```
           // Drop zone.
           assertThat(distributionZoneManager.dropZone(zoneName), 
willSucceedIn(3, SECONDS));
   ```
   From my point of view second approach is generally better.
   



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