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


##########
modules/distribution-zones/src/test/java/org/apache/ignite/internal/distributionzones/DistributionZoneManagerScaleUpTest.java:
##########
@@ -114,7 +114,13 @@ void testDataNodesPropagationAfterScaleUpTriggered() 
throws Exception {
 
         assertDataNodesForZone(1, 
clusterNodes2.stream().map(ClusterNode::name).collect(Collectors.toSet()), 
keyValueStorage);
 
-        assertZoneScaleUpChangeTriggerKey(1, 1, keyValueStorage);
+        topology.putNode(NODE_3);
+
+        Set<LogicalNode> clusterNodes3 = Set.of(NODE_1, NODE_2, NODE_3);
+
+        assertLogicalTopology(clusterNodes3, keyValueStorage);
+
+        assertDataNodesForZone(1, 
clusterNodes3.stream().map(ClusterNode::name).collect(Collectors.toSet()), 
keyValueStorage);

Review Comment:
   It worth to mention that
   
   - It's better to have `private static final int ZONE_1_ID = 1;` instead of 1.
   - Almost everywhere were we assert assertDataNodesForZone for zone1 we may 
also assert data nodes for the default one, I'd rather add following method to 
`DistributionZonesTestUtil`
   ```
       public static void assertDataNodesForZones(
               @Nullable Set<String> clusterNodes,
               KeyValueStorage keyValueStorage,
               int... zoneIds
       ) throws InterruptedException {
           for (int zoneId : zoneIds) {
               assertDataNodesForZone(zoneId, clusterNodes, keyValueStorage);
           }
       }
   ```



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