FaultInjection: Fix random number generation#30623
Merged
yashykt merged 8 commits intogrpc:masterfrom Aug 18, 2022
Merged
Conversation
markdroth
reviewed
Aug 18, 2022
Member
markdroth
left a comment
There was a problem hiding this comment.
This looks really good! Just one comment to address.
| TEST_P(FaultInjectionTest, XdsFaultInjectionPercentageDelay) { | ||
| CreateAndStartBackends(1); | ||
| const uint32_t kFixedDelayMilliseconds = 100000; | ||
| #ifndef NDEBUG |
Member
There was a problem hiding this comment.
I'm really not keen on putting #ifndefs in the middle of individual tests. Can we not just increase the timeout even for opt builds?
77ff4c2 to
9b93d05
Compare
markdroth
reviewed
Aug 18, 2022
markdroth
approved these changes
Aug 18, 2022
Member
Author
|
Thanks for reviewing! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
rand()is not thread-safe, so instead useabsl::InsecureBitGenandabsl::Uniformto generate random numbers.