Skip to content

test: fix TestAgent_Lifecycle/ShutdownScriptOnce to wait for stats #17387

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

Conversation

spikecurtis
Copy link
Contributor

@spikecurtis spikecurtis commented Apr 14, 2025

fixes: coder/internal#576

TestAgent_Lifecycle/ShutdownScriptOnce hits error logs which cause test failures. These logs are legit errors and have to do with shutting down the agent before it has fully come up.

This PR changes the test to wait for the agent to send stats (a good indicator that it's fully up, and beyond the errors that have triggered test failures in past) before closing it.

Copy link
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@spikecurtis spikecurtis requested a review from mafredri April 14, 2025 12:11
@spikecurtis spikecurtis marked this pull request as ready for review April 14, 2025 12:13
@spikecurtis spikecurtis changed the title fix: wait for agent to be up in TestAgent_Lifecycle/ShutdownScriptOnce fix: fix TestAgent_Lifecycle/ShutdownScriptOnce to wait for stats Apr 14, 2025
Copy link
Member

@mafredri mafredri left a comment

Choose a reason for hiding this comment

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

Suggestion, use the test: prefix for PR title to avoid polluting the changelog and keep focus for actual bug fixes. Otherwise LGTM as far as quick 'n dirty fixes go 😄.

@spikecurtis spikecurtis changed the title fix: fix TestAgent_Lifecycle/ShutdownScriptOnce to wait for stats test: fix TestAgent_Lifecycle/ShutdownScriptOnce to wait for stats Apr 14, 2025
@spikecurtis spikecurtis enabled auto-merge (squash) April 14, 2025 12:17
@spikecurtis spikecurtis merged commit 73f5af8 into main Apr 14, 2025
45 checks passed
@spikecurtis spikecurtis deleted the spike/internal-576-TestAgent_Lifecycle/ShutdownScriptOnce branch April 14, 2025 12:20
@github-actions github-actions bot locked and limited conversation to collaborators Apr 14, 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: TestAgent_Lifecycle/ShutdownScriptOnce
2 participants