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

[GitHub] [ignite-3] vldpyatkov commented on a diff in pull request #2259: IGNITE-19688 use waitAndGetLeader instead of waitLeader and getLeader

vldpyatkov commented on code in PR #2259:
URL: https://github.com/apache/ignite-3/pull/2259#discussion_r1245270944


##########
modules/raft/src/testFixtures/java/org/apache/ignite/raft/jraft/core/TestCluster.java:
##########
@@ -408,6 +408,26 @@ public void waitLeader() throws InterruptedException {
         }
     }
 
+    /**
+     * Wait until a leader is elected.
+     * @throws InterruptedException
+     * @return Leader
+     */
+    public Node waitAndGetLeader() throws InterruptedException {
+        Node node;
+
+        while (true) {

Review Comment:
   Do you sure about need an infinity loop here?



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