sergeyuttsel commented on code in PR #1532:
URL: https://github.com/apache/ignite-3/pull/1532#discussion_r1072749064


##########
modules/distribution-zones/src/main/java/org/apache/ignite/internal/distributionzones/DistributionZoneManager.java:
##########
@@ -590,6 +584,32 @@ private void updateMetaStorageOnZoneDelete(int zoneId, 
long revision) {
         }
     }
 
+    /**
+     * Updates {@link DistributionZoneChange} according to distribution zone 
configuration.
+     *
+     * @param zoneChange Zone change.
+     * @param distributionZoneCfg Distribution zone configuration.
+     */
+    private void updateZoneChange(DistributionZoneChange zoneChange, 
DistributionZoneConfigurationParameters distributionZoneCfg) {

Review Comment:
   Fixed.



##########
modules/distribution-zones/src/test/java/org/apache/ignite/internal/distributionzones/DistributionZoneManagerTest.java:
##########
@@ -226,59 +226,87 @@ public void testDropZoneIfNotExists() {
     }
 
     @Test
-    public void testUpdateZone() throws Exception {
-        distributionZoneManager.createZone(
-                        new 
DistributionZoneConfigurationParameters.Builder(ZONE_NAME).dataNodesAutoAdjust(100).build()
-                )
-                .get(5, TimeUnit.SECONDS);
+    public void testUpdateDefaultZone() throws Exception {
+        testUpdateZone(DEFAULT_ZONE_NAME);
+    }
 
-        DistributionZoneConfiguration zone1 = 
registry.getConfiguration(DistributionZonesConfiguration.KEY).distributionZones()
-                .get(ZONE_NAME);
+    @Test
+    public void testUpdateNotDefaultZone() throws Exception {
+        testUpdateZone(ZONE_NAME);
+    }
 
-        assertNotNull(zone1, "Zone was not created.");
-        assertEquals(ZONE_NAME, zone1.name().value(), "Zone name is wrong.");
-        assertEquals(Integer.MAX_VALUE, 
zone1.dataNodesAutoAdjustScaleUp().value(), "dataNodesAutoAdjustScaleUp is 
wrong.");
-        assertEquals(Integer.MAX_VALUE, 
zone1.dataNodesAutoAdjustScaleDown().value(), "dataNodesAutoAdjustScaleDown is 
wrong.");
-        assertEquals(100, zone1.dataNodesAutoAdjust().value(), 
"dataNodesAutoAdjust is wrong.");
+    public void testUpdateZone(String zoneName) throws Exception {

Review Comment:
   Fixed.



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