Skip to content
Snippets Groups Projects
Commit c903b61b authored by Vladimir Davydov's avatar Vladimir Davydov Committed by Vladimir Davydov
Browse files

test: fix flaky replication/gh_9049_schema_downgrade test

When a replica is restarted, it doesn't immediately switch to the
'follow' state. First it needs to sync. Let's wait for the 'follow'
state a bit to fix the following failure:

NO_WRAP
[039] replication-luatest/gh_9049_schema_downgrade_t>                 [ fail ]
[039] Test failed! Output from reject file /tmp/t/rejects/replication-luatest/gh_9049_schema_downgrade.reject:
[039] Tarantool version is 3.0.0-alpha3-18-g6892907bad9d
[039] TAP version 13
[039] 1..1
[039] # Started on Thu Sep 21 13:55:09 2023
[039] # Starting group: replication-luatest.gh_9049_schema_downgrade
[039] not ok 1  replication-luatest.gh_9049_schema_downgrade.test_schema_downgrade
[039] #   ...st/replication-luatest/gh_9049_schema_downgrade_test.lua:33: expected: "follow"
[039] #   actual: "sync"
[039] #   stack traceback:
[039] #         ...st/replication-luatest/gh_9049_schema_downgrade_test.lua:31: in function 'replication-luatest.gh_9049_schema_downgrade.test_schema_downgrade'
[039] #         ...
[039] #         [C]: in function 'xpcall'
[039] #   artifacts:
[039] #   replica -> /tmp/t/039_replication-luatest/artifacts/replica-AgoXGWUXxvnc
[039] #   master -> /tmp/t/039_replication-luatest/artifacts/master-ZUTtyXyAX9YF
[039] # Ran 1 tests in 1.768 seconds, 0 succeeded, 1 failed
NO_WRAP

Fixes commit 71de4b2c ("box: fix schema downgrade replication").

NO_DOC=test fix
NO_CHANGELOG=test fix
parent f22c88d2
No related branches found
No related tags found
No related merge requests found
......@@ -29,8 +29,10 @@ g.test_schema_downgrade = function(cg)
end, {version})
cg.replica:restart()
cg.replica:exec(function(version)
t.assert(box.info.replication[1].upstream)
t.assert_equals(box.info.replication[1].upstream.status, 'follow')
t.helpers.retrying({}, function()
t.assert(box.info.replication[1].upstream)
t.assert_equals(box.info.replication[1].upstream.status, 'follow')
end)
t.assert_equals(box.space._schema:get('version'), version)
end, {version})
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment