You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "rpuch (via GitHub)" <gi...@apache.org> on 2023/04/30 10:45:00 UTC

[GitHub] [ignite-3] rpuch opened a new pull request, #2001: IGNITE-18711 Leave logical topology gracefully when stopping Ignite node

rpuch opened a new pull request, #2001:
URL: https://github.com/apache/ignite-3/pull/2001

   https://issues.apache.org/jira/browse/IGNITE-18711


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


[GitHub] [ignite-3] SammyVimes merged pull request #2001: IGNITE-18711 Leave logical topology gracefully when stopping Ignite node

Posted by "SammyVimes (via GitHub)" <gi...@apache.org>.
SammyVimes merged PR #2001:
URL: https://github.com/apache/ignite-3/pull/2001


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


[GitHub] [ignite-3] rpuch commented on a diff in pull request #2001: IGNITE-18711 Leave logical topology gracefully when stopping Ignite node

Posted by "rpuch (via GitHub)" <gi...@apache.org>.
rpuch commented on code in PR #2001:
URL: https://github.com/apache/ignite-3/pull/2001#discussion_r1181766700


##########
modules/runner/src/integrationTest/java/org/apache/ignite/internal/compute/ItLogicalTopologyTest.java:
##########
@@ -337,6 +339,27 @@ public void onNodeValidated(LogicalNode validatedNode) {
         }
     }
 
+    @Test
+    void nodeLeavesLogicalTopologyOnStop() throws Exception {
+        IgniteImpl entryNode = node(0);
+
+        IgniteImpl secondIgnite = startNode(1);
+
+        entryNode.logicalTopologyService().addEventListener(listener);
+
+        stopNode(1);
+
+        assertTrue(waitForCondition(() -> !events.isEmpty(), 10_000), "Did not see any events in time");

Review Comment:
   Applied the change.
   
   If the test passes, the wait will be satisfied in much less than 10 seconds. If the logic is broken, the test will take 10 seconds (not a big deal for a failing test), but we'll not see false positives due to a too short timeout.



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


[GitHub] [ignite-3] sashapolo commented on a diff in pull request #2001: IGNITE-18711 Leave logical topology gracefully when stopping Ignite node

Posted by "sashapolo (via GitHub)" <gi...@apache.org>.
sashapolo commented on code in PR #2001:
URL: https://github.com/apache/ignite-3/pull/2001#discussion_r1182114552


##########
modules/runner/src/integrationTest/java/org/apache/ignite/internal/compute/ItLogicalTopologyTest.java:
##########
@@ -337,6 +339,27 @@ public void onNodeValidated(LogicalNode validatedNode) {
         }
     }
 
+    @Test
+    void nodeLeavesLogicalTopologyOnStop() throws Exception {
+        IgniteImpl entryNode = node(0);
+
+        IgniteImpl secondIgnite = startNode(1);
+
+        entryNode.logicalTopologyService().addEventListener(listener);
+
+        stopNode(1);
+
+        assertTrue(waitForCondition(() -> !events.isEmpty(), TimeUnit.SECONDS.toMillis(10)), "Did not see any events in time");

Review Comment:
   Why do you need to use `waitForCondition` if you can simply `poll` the event queue in order to wait for an event to appear?



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


[GitHub] [ignite-3] SammyVimes commented on a diff in pull request #2001: IGNITE-18711 Leave logical topology gracefully when stopping Ignite node

Posted by "SammyVimes (via GitHub)" <gi...@apache.org>.
SammyVimes commented on code in PR #2001:
URL: https://github.com/apache/ignite-3/pull/2001#discussion_r1181496359


##########
modules/runner/src/integrationTest/java/org/apache/ignite/internal/compute/ItLogicalTopologyTest.java:
##########
@@ -337,6 +339,27 @@ public void onNodeValidated(LogicalNode validatedNode) {
         }
     }
 
+    @Test
+    void nodeLeavesLogicalTopologyOnStop() throws Exception {
+        IgniteImpl entryNode = node(0);
+
+        IgniteImpl secondIgnite = startNode(1);
+
+        entryNode.logicalTopologyService().addEventListener(listener);
+
+        stopNode(1);
+
+        assertTrue(waitForCondition(() -> !events.isEmpty(), 10_000), "Did not see any events in time");

Review Comment:
   ```suggestion
           assertTrue(waitForCondition(() -> !events.isEmpty(), TimeUnit.SECONDS.toMillis(10)), "Did not see any events in time");
   ```
   Do we have to wait 10 seconds?



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