test: flaky election_basic.test.lua test
Found that on slow test hosts like FreeBSD VMware test flaky failed, like: [001] @@ -153,7 +153,7 @@ [001] | ... [001] assert(leader_count == 1) [001] | --- [001] - | - true [001] + | - error: assertion failed! [001] | ... [001] -- All nodes have the same leader. [001] r1_leader = test_run:eval('election_replica1', leader_id_cmd)[1] It happened because there was not enough time right after wait_fullmesh() call and before check of the current leader to make any of the replicas leader. Later in the code was not correct logic when checked who is the leader and choosed 'election_replica3' if not the others, it caused the later fails in the test. Decided to wait after wait_fullmesh() when any of the replicas became leader using test_cond() routine. Closes #5368
Loading
Please register or sign in to comment