This is an automated email from the ASF dual-hosted git repository.

sk0x50 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/ignite-3.git


The following commit(s) were added to refs/heads/main by this push:
     new 5f5d592494 IGNITE-20054 Disabled tests in 
ItIgniteDistributionZoneManagerNodeRestartTest were fixed. (#2425)
5f5d592494 is described below

commit 5f5d592494b8eac71e62e70a8dfb470d8f320800
Author: Sergey Uttsel <utt...@gmail.com>
AuthorDate: Mon Aug 28 10:23:59 2023 +0300

    IGNITE-20054 Disabled tests in 
ItIgniteDistributionZoneManagerNodeRestartTest were fixed. (#2425)
---
 ...niteDistributionZoneManagerNodeRestartTest.java | 64 +++++++++++++++++-----
 1 file changed, 51 insertions(+), 13 deletions(-)

diff --git 
a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/distribution/zones/ItIgniteDistributionZoneManagerNodeRestartTest.java
 
b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/distribution/zones/ItIgniteDistributionZoneManagerNodeRestartTest.java
index 06482bb2c9..c0d289fd47 100644
--- 
a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/distribution/zones/ItIgniteDistributionZoneManagerNodeRestartTest.java
+++ 
b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/distribution/zones/ItIgniteDistributionZoneManagerNodeRestartTest.java
@@ -17,6 +17,7 @@
 
 package org.apache.ignite.internal.distribution.zones;
 
+import static java.util.Collections.emptySet;
 import static java.util.concurrent.CompletableFuture.completedFuture;
 import static java.util.stream.Collectors.toSet;
 import static 
org.apache.ignite.internal.distributionzones.DistributionZoneManager.DEFAULT_ZONE_NAME;
@@ -92,7 +93,6 @@ import org.apache.ignite.network.NettyBootstrapFactory;
 import org.apache.ignite.network.NetworkAddress;
 import org.apache.ignite.network.scalecube.TestScaleCubeClusterServiceFactory;
 import org.jetbrains.annotations.Nullable;
-import org.junit.jupiter.api.Disabled;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.extension.ExtendWith;
 import org.junit.jupiter.params.ParameterizedTest;
@@ -378,7 +378,6 @@ public class ItIgniteDistributionZoneManagerNodeRestartTest 
extends BaseIgniteRe
         assertDataNodesFromManager(distributionZoneManager, () -> 
revisionBeforeRestart, zoneId, Set.of(A), TIMEOUT_MILLIS);
     }
 
-    @Disabled("https://issues.apache.org/jira/browse/IGNITE-20054";)
     @ParameterizedTest
     @MethodSource("provideArgumentsRestartTests")
     public void testScaleUpTimerIsRestoredAfterRestart(String zoneName) throws 
Exception {
@@ -407,11 +406,11 @@ public class 
ItIgniteDistributionZoneManagerNodeRestartTest extends BaseIgniteRe
         node.logicalTopology().putNode(C);
         node.logicalTopology().removeNodes(Set.of(B));
 
-        assertDataNodesFromManager(
-                distributionZoneManager,
-                metastore::appliedRevision,
-                zoneId,
-                Set.of(A),
+        assertValueInStorage(
+                metastore,
+                zoneDataNodesKey(zoneId),
+                (v) -> 
DistributionZonesUtil.dataNodes(fromBytes(v)).stream().map(Node::nodeName).collect(toSet()),
+                Set.of(A.name()),
                 TIMEOUT_MILLIS
         );
 
@@ -422,9 +421,18 @@ public class 
ItIgniteDistributionZoneManagerNodeRestartTest extends BaseIgniteRe
         distributionZoneManager = getDistributionZoneManager(node);
 
         assertDataNodesFromManager(distributionZoneManager, 
metastore::appliedRevision, zoneId, Set.of(A, C), TIMEOUT_MILLIS);
+
+        metastore = findComponent(node.startedComponents(), 
MetaStorageManager.class);
+
+        assertValueInStorage(
+                metastore,
+                zoneDataNodesKey(zoneId),
+                (v) -> 
DistributionZonesUtil.dataNodes(fromBytes(v)).stream().map(Node::nodeName).collect(toSet()),
+                Set.of(A.name(), C.name()),
+                TIMEOUT_MILLIS
+        );
     }
 
-    @Disabled("https://issues.apache.org/jira/browse/IGNITE-20054";)
     @ParameterizedTest
     @MethodSource("provideArgumentsRestartTests")
     public void 
testScaleUpTriggeredByFilterUpdateIsRestoredAfterRestart(String zoneName) 
throws Exception {
@@ -453,7 +461,13 @@ public class 
ItIgniteDistributionZoneManagerNodeRestartTest extends BaseIgniteRe
 
         alterZone(node, zoneName, null, null, filter);
 
-        assertDataNodesFromManager(distributionZoneManager, 
metastore::appliedRevision, zoneId, Set.of(A), TIMEOUT_MILLIS);
+        assertValueInStorage(
+                metastore,
+                zoneDataNodesKey(zoneId),
+                (v) -> 
DistributionZonesUtil.dataNodes(fromBytes(v)).stream().map(Node::nodeName).collect(toSet()),
+                Set.of(A.name()),
+                TIMEOUT_MILLIS
+        );
 
         node.stop();
 
@@ -464,7 +478,6 @@ public class ItIgniteDistributionZoneManagerNodeRestartTest 
extends BaseIgniteRe
         assertDataNodesFromManager(distributionZoneManager, 
metastore::appliedRevision, zoneId, Set.of(B), TIMEOUT_MILLIS);
     }
 
-    @Disabled("https://issues.apache.org/jira/browse/IGNITE-20054";)
     @ParameterizedTest
     @MethodSource("provideArgumentsRestartTests")
     public void 
testScaleUpsTriggeredByFilterUpdateAndNodeJoinAreRestoredAfterRestart(String 
zoneName) throws Exception {
@@ -497,7 +510,13 @@ public class 
ItIgniteDistributionZoneManagerNodeRestartTest extends BaseIgniteRe
 
         node.logicalTopology().removeNodes(Set.of(A));
 
-        assertDataNodesFromManager(distributionZoneManager, 
metastore::appliedRevision, zoneId, Set.of(), TIMEOUT_MILLIS);
+        assertValueInStorage(
+                metastore,
+                zoneDataNodesKey(zoneId),
+                (v) -> 
DistributionZonesUtil.dataNodes(fromBytes(v)).stream().map(Node::nodeName).collect(toSet()),
+                emptySet(),
+                TIMEOUT_MILLIS
+        );
 
         node.stop();
 
@@ -515,10 +534,19 @@ public class 
ItIgniteDistributionZoneManagerNodeRestartTest extends BaseIgniteRe
 
         alterZone(node, zoneName, IMMEDIATE_TIMER_VALUE, null, null);
 
-        assertDataNodesFromManager(distributionZoneManager, 
metastore::appliedRevision, zoneId, Set.of(B, C), TIMEOUT_MILLIS);
+        assertDataNodesFromManager(distributionZoneManager, () -> 
metastore.appliedRevision(), zoneId, Set.of(B, C), TIMEOUT_MILLIS);
+
+        metastore = findComponent(node.startedComponents(), 
MetaStorageManager.class);
+
+        assertValueInStorage(
+                metastore,
+                zoneDataNodesKey(zoneId),
+                (v) -> 
DistributionZonesUtil.dataNodes(fromBytes(v)).stream().map(Node::nodeName).collect(toSet()),
+                Set.of(B.name(), C.name()),
+                TIMEOUT_MILLIS
+        );
     }
 
-    @Disabled("https://issues.apache.org/jira/browse/IGNITE-20054";)
     @ParameterizedTest
     @MethodSource("provideArgumentsRestartTests")
     public void testScaleDownTimerIsRestoredAfterRestart(String zoneName) 
throws Exception {
@@ -555,6 +583,16 @@ public class 
ItIgniteDistributionZoneManagerNodeRestartTest extends BaseIgniteRe
                 Set.of(A, C),
                 TIMEOUT_MILLIS
         );
+
+        metastore = findComponent(node.startedComponents(), 
MetaStorageManager.class);
+
+        assertValueInStorage(
+                metastore,
+                zoneDataNodesKey(zoneId),
+                (v) -> 
DistributionZonesUtil.dataNodes(fromBytes(v)).stream().map(Node::nodeName).collect(toSet()),
+                Set.of(A.name(), C.name()),
+                TIMEOUT_MILLIS
+        );
     }
 
     private static String[] provideArgumentsRestartTests() {

Reply via email to