Skip to content
Snippets Groups Projects
Commit 30524dd9 authored by Aleksandr Lyapunov's avatar Aleksandr Lyapunov Committed by Aleksandr Lyapunov
Browse files

net.replicaset: fix a flacky test

The test checks that net.replicaset connection switches to the
new leader when the new leader is elected. Unfortunately the
test expects that after successful call of box.ctl.promote()
the old leader is guaranteed to be in RO state. Actually this
is incorrect: the new leader can legally rely on the quorum
with the third instance without even notifying the original
leader about new election term started, so the old leader may
remain in RW state. Since the replicaset connection updates
states of instances asynchronously it also may think (for some
time) that the old leader is the only RW instance in replicaset.

Fix it by including check of the new leader into retrying block
of the test.

Hotfix #9823

NO_CHANGELOG=fix flaky test
NO_DOC=fix flaky test
parent 9355933f
No related branches found
No related tags found
No related merge requests found
Loading
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