forked from elastic/elasticsearch
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reproducible randoms in SearchWhileCreatingIndexIT
This commit removes non-reproducible randomness from SearchWhileCreatingIndexIT. The cause of the non-reproducible randomness is the use of a random draws for the shard preference inside of a non-deterministic while loop. Because the inner while loop executed a non-deterministic number of times, the draws for the next iteration of the outer loop would be impacted by this making the random draws non-reproducible. The solution is to move the random draws outside of the while loop (just make a single draw for the prefernce and increment with a counter), and remove the outer loop iteration instead using an annotation to get the desired repetitions. Closes elastic#16208
- Loading branch information
1 parent
aff3c56
commit 4c1e93b
Showing
1 changed file
with
35 additions
and
31 deletions.
There are no files selected for viewing
This file contains 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