Skip to content
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

Use Rand per-test in agent/plugin/error_test.go #2795

Merged
merged 1 commit into from
May 27, 2024
Merged

Conversation

moskyb
Copy link
Contributor

@moskyb moskyb commented May 27, 2024

rand.Rands are not threadsafe and only one should be used per goroutine, so one should be used per parallel tests, and shouldn't be shared between them

rand.Rands are not threadsafe and only one should be used per goroutine
@moskyb moskyb requested a review from DrJosh9000 May 27, 2024 06:55
Copy link

@CerealBoy CerealBoy left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Contributor

@DrJosh9000 DrJosh9000 left a comment

Choose a reason for hiding this comment

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

Very true!

@moskyb moskyb enabled auto-merge May 27, 2024 07:06
@moskyb moskyb merged commit 5af3edd into main May 27, 2024
1 check passed
@moskyb moskyb deleted the fix-race-randv2 branch May 27, 2024 07:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants