Skip to content

fix(coderd/workspaceapps/apptest): bump sleep in testReconnectingPTY #9875

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
Sep 26, 2023

Conversation

johnstcn
Copy link
Member

@johnstcn johnstcn commented Sep 26, 2023

There have been a number of flakes relating to ReconnectingPTY today:

https://github.com/coder/coder/actions/runs/6307298449/job/17123720595
https://github.com/coder/coder/actions/runs/6311073023/job/17134881807
https://github.com/coder/coder/actions/runs/6310493820/job/17132579563

There's a 100-millisecond sleep in testReconnectingPTY() to make sure that we don't try writing while there's a prompt.

Instead of sleeping, we could wait for the prompt, but that would require a t.Setenv to set the prompt to some known value, and removing t.Parallel() in a bunch of places.

Instead opting to simply bump the sleep duration and hope this helps.

This WILL NOT un-break #9764 but should hopefully significantly reduce its occurrence.

@johnstcn johnstcn self-assigned this Sep 26, 2023
@johnstcn johnstcn requested review from mafredri and mtojek September 26, 2023 13:10
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.

I wonder if this would be a feasible option for setting the prompt?

image

@johnstcn
Copy link
Member Author

I wonder if this would be a feasible option for setting the prompt?

Sadly this doesn't seem to do it. I also tried setting it in the test proper and it didn't seem to take effect.

@johnstcn johnstcn merged commit 1f43357 into main Sep 26, 2023
@johnstcn johnstcn deleted the cj/flake/testReconnectingPTYSleep branch September 26, 2023 13:58
@github-actions github-actions bot locked and limited conversation to collaborators Sep 26, 2023
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.

2 participants