Skip to content

internal: seed random for wrr tests #2791

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 26, 2019
Merged

Conversation

menghanl
Copy link
Contributor

No description provided.


func init() {
r := rand.New(rand.NewSource(0))
grpcrandInt63n = r.Int63n
Copy link
Member

Choose a reason for hiding this comment

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

This source is not threadsafe - is that OK?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's OK here, they are single thread unit tests.

@dfawley dfawley changed the title internal: see random for wrr tests internal: seed random for wrr tests Apr 26, 2019
@menghanl menghanl merged commit a90198c into grpc:master Apr 26, 2019
@menghanl menghanl deleted the grpcrand_seed branch April 26, 2019 21:48
@lock lock bot locked as resolved and limited conversation to collaborators Oct 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants