Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix: use concurrency-safe bytes buffer to avoid race #15142

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 2 commits into from
Oct 21, 2024
Merged

Conversation

dannykopping
Copy link
Contributor

@dannykopping dannykopping commented Oct 18, 2024

Fixes coder/internal#93

bytes.Buffer is not concurrency-safe.

cmd could write to the buffer concurrently while we're reading the buffer in

require.Eventually(t, func() bool {
	return bytes.Contains(output.Bytes(), []byte("ERROR: Downloaded agent binary returned unexpected version output"))
}, testutil.WaitShort, testutil.IntervalSlow)

Not sure about the os: process already finished flake, though.

@dannykopping dannykopping changed the title Use concurrency-safe bytes buffer to avoid race fix: use concurrency-safe bytes buffer to avoid race Oct 18, 2024
@dannykopping dannykopping marked this pull request as ready for review October 18, 2024 18:30
Signed-off-by: Danny Kopping <[email protected]>
@ethanndickson ethanndickson merged commit b9d441f into main Oct 21, 2024
29 checks passed
@ethanndickson ethanndickson deleted the dk/fix93 branch October 21, 2024 06:24
@github-actions github-actions bot locked and limited conversation to collaborators Oct 21, 2024
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: TestAgentScript/Invalid
3 participants