From e8ef0b34da0297e40961671ad118cb53d11218f8 Mon Sep 17 00:00:00 2001
From: Georgy Moshkin <gmoshkin@picodata.io>
Date: Wed, 14 Dec 2022 15:50:14 +0300
Subject: [PATCH] test: wait online before requesting vote to avoid rejections

It could happen that i1 persists an extra entry before i2 gets it, and
if i2 starts requesting a vote over and over, it won't get that entry.
---
 test/int/test_joining.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/test/int/test_joining.py b/test/int/test_joining.py
index 094ffac528..05ac57288a 100644
--- a/test/int/test_joining.py
+++ b/test/int/test_joining.py
@@ -161,6 +161,7 @@ def test_replication(cluster: Cluster):
     i2.restart()
     wait_replicated(i2)
 
+    i2.wait_online()
     i2.promote_or_fail()
 
     i1.assert_raft_status("Follower")
-- 
GitLab