You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "sanpwc (via GitHub)" <gi...@apache.org> on 2023/05/16 05:08:56 UTC

[GitHub] [ignite-3] sanpwc commented on a diff in pull request #2072: IGNITE-19342 Some tests from DistributionZoneManagerScaleUpTest were fixed and enabled.

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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org