Skip to content

fix(agent/agentcontainers): fix TestAPI/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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 17, 2025

Conversation

DanielleMaywood
Copy link
Contributor

@DanielleMaywood DanielleMaywood commented Jul 16, 2025

@DanielleMaywood DanielleMaywood marked this pull request as ready for review July 17, 2025 08:50
Copy link
Contributor

@Copilot Copilot AI left a 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 in TestAPI/NoUpdaterLoopLogspam by ensuring the watcher loop’s initialization log does not race with test assertions.

  • Injects a fakeWatcher into the API via WithWatcher 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 to watcher or fakeWatcher for improved readability in tests.
			fWatcher = newFakeWatcher(t)

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@DanielleMaywood DanielleMaywood merged commit fb00cd2 into main Jul 17, 2025
30 checks passed
@DanielleMaywood DanielleMaywood deleted the danielle/fix-agentcontainers-flake branch July 17, 2025 09:59
@github-actions github-actions bot locked and limited conversation to collaborators Jul 17, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

flake: TestAPI/NoUpdaterLoopLogspam
2 participants