Skip to content

tests: fix flaky TestConnectionHandlerUpdateError#573

Merged
oleg-jukovec merged 1 commit intomasterfrom
oleg-jukovec/fix-flaky-pool
Apr 20, 2026
Merged

tests: fix flaky TestConnectionHandlerUpdateError#573
oleg-jukovec merged 1 commit intomasterfrom
oleg-jukovec/fix-flaky-pool

Conversation

@oleg-jukovec
Copy link
Copy Markdown
Collaborator

The test set servers to read_only one-by-one via pool connections with pool.RW mode, but the background checker (with 100µs timeout) could detect the role change and close the connection before the next iteration found an RW server, causing "connection closed by client" errors.

Now SetClusterRO is used to set both servers read_only directly, bypassing the pool and avoiding the race.

The test set servers to read_only one-by-one via pool connections
with pool.RW mode, but the background checker (with 100µs timeout)
could detect the role change and close the connection before the
next iteration found an RW server, causing "connection closed by
client" errors.

Now SetClusterRO is used to set both servers read_only directly,
bypassing the pool and avoiding the race.
@oleg-jukovec oleg-jukovec merged commit 7a6f874 into master Apr 20, 2026
27 checks passed
@oleg-jukovec oleg-jukovec deleted the oleg-jukovec/fix-flaky-pool branch April 20, 2026 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants