alievmirza commented on code in PR #2490:
URL: https://github.com/apache/ignite-3/pull/2490#discussion_r1305661164


##########
modules/distribution-zones/src/test/java/org/apache/ignite/internal/distributionzones/DistributionZoneManagerWatchListenerTest.java:
##########
@@ -18,61 +18,25 @@
 package org.apache.ignite.internal.distributionzones;
 
 import static 
org.apache.ignite.internal.distributionzones.DistributionZoneManager.DEFAULT_ZONE_NAME;
-import static 
org.apache.ignite.internal.distributionzones.DistributionZoneManager.IMMEDIATE_TIMER_VALUE;
-import static 
org.apache.ignite.internal.distributionzones.DistributionZoneManager.INFINITE_TIMER_VALUE;
 import static 
org.apache.ignite.internal.distributionzones.DistributionZonesTestUtil.assertDataNodesForZone;
 import static 
org.apache.ignite.internal.distributionzones.DistributionZonesTestUtil.mockVaultZonesLogicalTopologyKey;
-import static 
org.apache.ignite.internal.distributionzones.DistributionZonesTestUtil.setLogicalTopologyInMetaStorage;
-import static 
org.apache.ignite.internal.distributionzones.DistributionZonesUtil.zoneDataNodesKey;
-import static 
org.apache.ignite.internal.distributionzones.DistributionZonesUtil.zoneScaleUpChangeTriggerKey;
 import static 
org.apache.ignite.internal.distributionzones.DistributionZonesUtil.zonesChangeTriggerKey;
 import static org.apache.ignite.internal.util.ByteUtils.longToBytes;
 
 import java.util.Collections;
-import java.util.List;
 import java.util.Set;
 import org.apache.ignite.internal.cluster.management.topology.api.LogicalNode;
 import org.apache.ignite.internal.hlc.HybridTimestamp;
 import org.apache.ignite.network.ClusterNodeImpl;
 import org.apache.ignite.network.NetworkAddress;
-import org.junit.jupiter.api.Disabled;
 import org.junit.jupiter.api.Test;
 
 /**
  * Tests distribution zones logical topology changes and reaction to that 
changes.
  */
-//TODO: IGNITE-18564 Add tests with not default distribution zones, when 
distributionZones.change.trigger per zone will be created.
 public class DistributionZoneManagerWatchListenerTest extends 
BaseDistributionZoneManagerTest {
-    private static final LogicalNode NODE_1 = new LogicalNode("node1", 
"node1", new NetworkAddress("localhost", 123));
-    private static final LogicalNode NODE_2 = new LogicalNode("node2", 
"node2", new NetworkAddress("localhost", 123));
-
-    @Test
-    @Disabled("IGNITE-18564")
-    void testStaleWatchEvent() throws Exception {
-        mockVaultZonesLogicalTopologyKey(Set.of(NODE_1), vaultMgr, 
metaStorageManager.appliedRevision());
-
-        startDistributionZoneManager();
-
-        alterZone(DEFAULT_ZONE_NAME, IMMEDIATE_TIMER_VALUE, 
INFINITE_TIMER_VALUE, null);
-
-        long revision = 100;
-
-        int defaultZoneId = getZoneId(DEFAULT_ZONE_NAME);
-
-        keyValueStorage.putAll(
-                List.of(zoneScaleUpChangeTriggerKey(defaultZoneId).bytes(), 
zoneDataNodesKey(defaultZoneId).bytes()),
-                List.of(longToBytes(revision), 
keyValueStorage.get(zoneDataNodesKey(defaultZoneId).bytes()).value()),
-                HybridTimestamp.MIN_VALUE
-        );
-
-        Set<LogicalNode> nodes = Set.of(NODE_1, NODE_2);
-
-        setLogicalTopologyInMetaStorage(nodes, 100, metaStorageManager);
-
-        // TODO: IGNITE-18564 This is incorrect to check that data nodes are 
the same right after logical topology is changes manually.
-        assertDataNodesForZone(defaultZoneId, Set.of(NODE_1), keyValueStorage);
-    }
 
+    //TODO: IGNITE-19955 Check if this test is needed.

Review Comment:
   This test is kinda strange and tests some strange invariants, that will be 
changed after new restart mechanism will be implemented.  
   For the sake of the saving a scenario, let's save this test, but move to the 
`DistributionZoneManagerLogicalTopologyEventsTest`, because this test is not 
related to ant watch listener.
   As a result, `DistributionZoneManagerWatchListenerTest` could be removed 



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