tarantool / tarantool-qa

QA related issues of Tarantool
3 stars 0 forks source link

test: flaky replication-luatest/bootstrap_strategy_test.lua #331

Closed sergepetrenko closed 8 months ago

sergepetrenko commented 8 months ago

Test replication-luatest/bootstrap_strategy_test.lua is flaky

Running the test a lot in parallel shows the following error:

[032] not ok 7  gh-7999-bootstrap-strategy-config.test_replication_without_bootstrap_leader
[032] #   ...nko/Source/sptnt/test-run/lib/luatest/luatest/server.lua:441: ...nko/Source/sptnt/test-run/lib/luatest/luatest/server.lua:417: Timed out to wait for "process is terminated" condition for server (alias: server2, workdir: server2-twonxuVZhmaX, pid: 32247) within 60s
[032] #   stack traceback:
[032] #     ...tnt/test/replication-luatest/bootstrap_strategy_test.lua:289: in function <...tnt/test/replication-luatest/bootstrap_strategy_test.lua:287>
[032] #     ...
[032] #     [C]: in function 'xpcall'
[032] #   artifacts:
[032] #     server1 -> /private/tmp/t/032_replication-luatest/artifacts/rs-fVCA2kOlQx-T/server1-Z586uOxV8ZAx
[032] #     server2 -> /private/tmp/t/032_replication-luatest/artifacts/rs-fVCA2kOlQx-T/server2-twonxuVZhmaX
[032] 
[032] [test-run server "luatest_server"] The log file /private/tmp/t/032_replication-luatest/bootstrap_strategy_test.log has zero size
[Main process] Got failed test; gently terminate all workers...
[032] Worker "032_replication-luatest" got failed test; stopping the server...

Bisect shows that the test became flaky after commit tarantool/tarantool@bf620650c429d0b6c0bae8588f54ea56a0299fd6.

While investigating I found out that applying the following diff fixes the test hang, so it is probably some issue with curl requests made by the feedback daemon on shutdown:

diff --git a/test/replication-luatest/bootstrap_strategy_test.lua b/test/replication-luatest/bootstrap_strategy_test.lua
index 496a30e39b..5eee3ffed3 100644
--- a/test/replication-luatest/bootstrap_strategy_test.lua
+++ b/test/replication-luatest/bootstrap_strategy_test.lua
@@ -271,6 +271,7 @@ g_config.before_test('test_replication_without_bootstrap_leader', function(cg)
     cg.server2 = cg.replica_set:build_and_add_server{
         alias = 'server2',
         box_cfg = {
+            feedback_enabled = false,
             replication_timeout = 0.1,
         },
     }
sergepetrenko commented 8 months ago

The issue got fixed by tarantool/tarantool@d40ce0fa028a2ee54574ede00b035b9ac66277b7