Skip to content

Commit

Permalink
Random iterations in testDataOnlyNodePersistence (elastic#56906)
Browse files Browse the repository at this point in the history
PR elastic#56893 was supposed to randomise the iteration count in
`testDataOnlyNodePersistence` but this change was mistakenly omitted. This
commit addresses this.
  • Loading branch information
DaveCTurner committed May 18, 2020
1 parent 64280b4 commit 9ba897f
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,8 @@ public void testDataOnlyNodePersistence() throws Exception {
// generate a series of updates and check if batching works
final String indexName = randomAlphaOfLength(10);
long currentTerm = state.term();
for (int i = 0; i < 1000; i++) {
final int iterations = randomIntBetween(1, 1000);
for (int i = 0; i < iterations; i++) {
if (rarely()) {
// bump term
currentTerm = currentTerm + (rarely() ? randomIntBetween(1, 5) : 0L);
Expand Down

0 comments on commit 9ba897f

Please sign in to comment.