Random iterations in testDataOnlyNodePersistence (#56906)

PR #56893 was supposed to randomise the iteration count in
`testDataOnlyNodePersistence` but this change was mistakenly omitted. This
commit addresses this.
This commit is contained in:
David Turner 2020-05-18 15:15:56 +01:00
parent 64280b489b
commit 9ba897fbd6
1 changed files with 2 additions and 1 deletions

View File

@ -395,7 +395,8 @@ public class GatewayMetaStatePersistedStateTests extends ESTestCase {
// 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);