From dc8973c3de6311ab11df8d43520e1d40de4b9c7b Mon Sep 17 00:00:00 2001
From: Nikita Zheleztsov <n.zheleztsov@proton.me>
Date: Wed, 30 Aug 2023 16:07:01 +0300
Subject: [PATCH] test: fix flaky gh_7581_downstream_lag_test

The test starts the cluster and immediately tries to create a space
on master. Sometimes it fails with "Can't modify data on a read-only
instance - it is an orphan" error.

When the instance is not in sync with sufficient number of nodes
it has orphan status, which means the instance is read-only. Sometimes,
the instance doesn't have enough time to connect to all instances and
get out of orphan state.

Let's add waiting until every node is connected to every other node
in the replica set.

Closes tarantool/tarantool-qa#326

NO_CHANGELOG=test
NO_DOC=test
---
 test/replication-luatest/gh_7581_downstream_lag_test.lua | 1 +
 1 file changed, 1 insertion(+)

diff --git a/test/replication-luatest/gh_7581_downstream_lag_test.lua b/test/replication-luatest/gh_7581_downstream_lag_test.lua
index 6ec3a8c11a..9e946808d3 100644
--- a/test/replication-luatest/gh_7581_downstream_lag_test.lua
+++ b/test/replication-luatest/gh_7581_downstream_lag_test.lua
@@ -30,6 +30,7 @@ g.before_each(function(g)
         box_cfg = box_cfg,
     })
     g.cluster:start()
+    g.cluster:wait_for_fullmesh()
     g.server1:exec(function()
         box.schema.space.create("test")
         box.space.test:create_index("pk")
-- 
GitLab