- Notifications
You must be signed in to change notification settings - Fork948
fix(agent/agentcontainers): fixTestAPI/NoUpdaterLoopLogspam
flake#18905
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Pull Request Overview
This PR fixes a flake inTestAPI/NoUpdaterLoopLogspam
by ensuring the watcher loop’s initialization log does not race with test assertions.
- Injects a
fakeWatcher
into the API viaWithWatcher
to control watcher behavior during tests - Uses
testutil.RequireReceive
to wait for the watcher loop to start before advancing the clock
Comments suppressed due to low confidence (1)
agent/agentcontainers/api_test.go:361
- [nitpick] The variable name
fWatcher
is a bit ambiguous. Consider renaming it towatcher
orfakeWatcher
for improved readability in tests.
fWatcher = newFakeWatcher(t)
Uh oh!
There was an error while loading.Please reload this page.
fb00cd2
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#766