Skip to content
Snippets Groups Projects
Commit 3290d48a authored by Vladislav Shpilevoy's avatar Vladislav Shpilevoy
Browse files

test: fix flaky qsync_snapshots.test.lua again

One of the test cases started a sync transaction on master,
switched to replica, and tried to do some actions assuming that
the latest master data has arrived here.

But in fact the replica could be far behind the master. It could
still contain data from the previous test case. That led to a
bug, when it looked like if the replica had some data committed
on it, but not committed on master - this was just data from the
previous test case.

The issue is solved by flushing master's state to replica via
making a successful sync transaction.

Closes #5167
parent 47551843
No related branches found
No related tags found
No related merge requests found
......@@ -176,8 +176,14 @@ _ = box.schema.space.create('sync', {is_sync=true, engine=engine})
_ = box.space.sync:create_index('pk')
| ---
| ...
-- Write something to flush the current master's state to replica.
_ = box.space.sync:insert{1}
| ---
| ...
_ = box.space.sync:delete{1}
| ---
| ...
-- Testcase body.
test_run:switch('default')
| ---
| - true
......
......@@ -85,8 +85,10 @@ test_run:switch('default')
box.cfg{replication_synchro_quorum=NUM_INSTANCES, replication_synchro_timeout=1000}
_ = box.schema.space.create('sync', {is_sync=true, engine=engine})
_ = box.space.sync:create_index('pk')
-- Write something to flush the current master's state to replica.
_ = box.space.sync:insert{1}
_ = box.space.sync:delete{1}
-- Testcase body.
test_run:switch('default')
box.cfg{replication_synchro_quorum=BROKEN_QUORUM}
ok, err = nil
......
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