Skip to content

test: fix flaky test #453

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

elhimov
Copy link

@elhimov elhimov commented Jul 30, 2025

Helper method that performs initial assigning of master/replica roles and is widely used in ConnectionPool tests was adjusted to wait for the roles to be applied successfully.
Prior to this patch it doesn't, so sometimes subsequent test code might work unexpectedly (the problem was caught with
TestConnectionHandlerOpenUpdateClose)

Related issues:

Closes #452

@elhimov elhimov force-pushed the elhimov/gh-452-flaky-on-mac-TestConnectionHandlerOpenUpdateClose branch 2 times, most recently from 0b1890e to e7c2e9c Compare July 30, 2025 14:53
@elhimov elhimov marked this pull request as draft July 30, 2025 15:12
@elhimov elhimov force-pushed the elhimov/gh-452-flaky-on-mac-TestConnectionHandlerOpenUpdateClose branch 2 times, most recently from e002994 to 76e4a2f Compare August 5, 2025 10:03
@elhimov elhimov marked this pull request as ready for review August 5, 2025 10:04
@elhimov elhimov requested review from bigbes and dmyger August 5, 2025 10:04
Copy link

@bigbes bigbes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Theoretically, I understand these changes and believe they should work, but I can't guarantee it.
It's up to you to agree or disagree with style comments, since it's test code.

@elhimov elhimov force-pushed the elhimov/gh-452-flaky-on-mac-TestConnectionHandlerOpenUpdateClose branch from 76e4a2f to 537f38f Compare August 5, 2025 21:25
@elhimov elhimov requested a review from bigbes August 5, 2025 23:20
@elhimov elhimov requested a review from dmyger August 6, 2025 10:13
@elhimov elhimov force-pushed the elhimov/gh-452-flaky-on-mac-TestConnectionHandlerOpenUpdateClose branch from 537f38f to f443836 Compare August 7, 2025 18:33
@elhimov elhimov requested a review from oleg-jukovec August 7, 2025 19:06
Copy link
Collaborator

@oleg-jukovec oleg-jukovec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see unresolved comment above.

@elhimov elhimov force-pushed the elhimov/gh-452-flaky-on-mac-TestConnectionHandlerOpenUpdateClose branch from df9cc0f to 92cbe14 Compare August 8, 2025 12:10
elhimov added 3 commits August 8, 2025 15:55
General context approach is used in multi-instances functions -- context
is passed as a first argument.
Helper method that performs initial assigning of master/replica roles
and is widely used in ConnectionPool tests was adjusted to wait for
the roles to be applied successfully.
Prior to this patch it doesn't, so sometimes subsequent test code might
work unexpectedly (the problem was caught with
TestConnectionHandlerOpenUpdateClose)

Closes #452
@elhimov elhimov force-pushed the elhimov/gh-452-flaky-on-mac-TestConnectionHandlerOpenUpdateClose branch from 92cbe14 to f859fca Compare August 8, 2025 12:55
@elhimov elhimov requested a review from oleg-jukovec August 8, 2025 16:16
@oleg-jukovec oleg-jukovec merged commit 44917a0 into master Aug 11, 2025
26 checks passed
@oleg-jukovec oleg-jukovec deleted the elhimov/gh-452-flaky-on-mac-TestConnectionHandlerOpenUpdateClose branch August 11, 2025 12:28
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.

Flaky test TestConnectionHandlerOpenUpdateClose on mac
4 participants