- Notifications
You must be signed in to change notification settings - Fork1k
test: fix TestAgentConnectionMonitor_PingTimeout race with mock assertions#19836
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
This stack of pull requests is managed byGraphite. Learn more aboutstacking. |
ethanndickson commentedSep 16, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
fwiw, I've recently tended towards using |
655a36c
intomainUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Fixescoder/internal#970
The test doesn't wait for
monitor()
to complete, and the mock database call that we assert takes place in adefer
withinmonitor()
. This allows the mock assertions to race with the defer and flake the test.Solution is to explicitly wait for
monitor()
to complete before the end of the test, so that mock assertions (which happen in at.Cleanup()
) don't race.