Skip to content

Commit e901b0e

Browse files
committed
test: stabilize replication/bootstrap_leader test
The commit 89cd7f4 ("replication: do not account booting replicas in sync quorum") allowed replicas to leave orphan mode without waiting for everyone listed in box.cfg.replication. As a result, bootstrap_leader test started exiting too early, because it relied on one of the replicas staying in orphan mode until all the others finish bootstrap. Fix it. Also, remove "memtx" and "vinyl" configuration for the test. There is nothing in the test related to engines. While we're at it, remove the test from fragile list. It hasn't flaked since long ago, excluding the last couple of weeks, which's fixed now. Closes tarantool/tarantool-qa#63 NO_CHANGELOG=flaky test NO_DOC=flaky test (cherry picked from commit abf54f3)
1 parent 74a4adb commit e901b0e

File tree

4 files changed

+15
-5
lines changed

4 files changed

+15
-5
lines changed

test/replication/bootstrap_leader.result

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,20 @@ while (#box.info.replication < 3) do
4343
end;
4444
| ---
4545
| ...
46-
test_run:cmd("switch default");
46+
47+
test_run:cmd("switch replica2");
48+
| ---
49+
| - true
50+
| ...
51+
test_run:wait_upstream(1, {status = "follow"});
4752
| ---
4853
| - true
4954
| ...
5055

56+
test_run:cmd("switch default");
57+
| ---
58+
| - true
59+
| ...
5160
for i = 1,3 do
5261
test_run:cmd("stop server replica"..i.." with cleanup=1")
5362
test_run:cmd("delete server replica"..i)

test/replication/bootstrap_leader.test.lua

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,11 @@ fiber = require('fiber');
1717
while (#box.info.replication < 3) do
1818
fiber.sleep(0.05)
1919
end;
20-
test_run:cmd("switch default");
2120

21+
test_run:cmd("switch replica2");
22+
test_run:wait_upstream(1, {status = "follow"});
23+
24+
test_run:cmd("switch default");
2225
for i = 1,3 do
2326
test_run:cmd("stop server replica"..i.." with cleanup=1")
2427
test_run:cmd("delete server replica"..i)

test/replication/suite.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"anon.test.lua": {},
33
"anon_register_gap.test.lua": {},
4+
"bootstrap_leader.test.lua": {},
45
"gh-2991-misc-asserts-on-update.test.lua": {},
56
"gh-3055-election-promote.test.lua": {},
67
"gh-3055-promote-wakeup-crash.test.lua": {},

test/replication/suite.ini

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,6 @@ fragile = {
9696
"gc.test.lua": {
9797
"issues": [ "gh-5474" ]
9898
},
99-
"bootstrap_leader.test.lua": {
100-
"issues": [ "gh-5478" ]
101-
},
10299
"gh-5426-election-on-off.test.lua": {
103100
"issues": [ "gh-5506" ]
104101
},

0 commit comments

Comments
 (0)