Skip to content

chore(agent/agentscripts): increase timeout in TestTimeout #17293

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 1 commit into from
Apr 8, 2025

Conversation

johnstcn
Copy link
Member

@johnstcn johnstcn commented Apr 8, 2025

Fixes coder/internal#329

This was due to a race between the process starting and the timeout of the agent startup script executor. I'm taking the 'lazy' route here and increasing the timeout to 100ms. This does technically mean that this makes the test 100 times longer to execute. However, if it takes more than 100ms to run a sleep infinity command on our test runner, I think we have other issues.

@johnstcn johnstcn requested a review from mafredri April 8, 2025 14:11
@johnstcn johnstcn self-assigned this Apr 8, 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.

Can't hurt 👍🏻

@johnstcn johnstcn enabled auto-merge (squash) April 8, 2025 14:14
@johnstcn
Copy link
Member Author

johnstcn commented Apr 8, 2025

wat.

    agentscripts_test.go:114: 
        	Error Trace:	/Users/runner/work/coder/coder/agent/agentscripts/agentscripts_test.go:114
        	Error:      	Target error should be in err chain:
        	            	expected: "script timed out"
        	            	in chain: "run agent script \"05047da2-9490-446e-a986-b71b475bb0fa\": exit status 1"
        	            		"exit status 1"
        	Test:       	TestTimeout

@johnstcn johnstcn merged commit 44ddc9f into main Apr 8, 2025
36 checks passed
@johnstcn johnstcn deleted the cj/flake/agentscripts/TestTimeout branch April 8, 2025 14:35
@github-actions github-actions bot locked and limited conversation to collaborators Apr 8, 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: agent/agentscripts TestTimeout: signal: hangup
2 participants