fix(coderd/workspaceapps/apptest): bump sleep in testReconnectingPTY #9875
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 removingt.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.