Skip to content

Commit

Permalink
Increase timeout testFollowIndexWithConcurrentMappingChanges
Browse files Browse the repository at this point in the history
Fixes #59273
  • Loading branch information
dnhatn committed Jul 26, 2020
1 parent 234d004 commit 11ddf27
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,9 @@ public void testFollowIndexWithConcurrentMappingChanges() throws Exception {
leaderClient().admin().indices().prepareFlush("index1").setForce(true).get();
}
}
leaderClient().admin().indices().prepareFlush("index1").setForce(true).setWaitIfOngoing(true).get();
if (between(0, 100) < 20) {
leaderClient().admin().indices().prepareFlush("index1").setForce(false).setWaitIfOngoing(false).get();
}
}
});
thread.start();
Expand All @@ -290,7 +292,7 @@ public void testFollowIndexWithConcurrentMappingChanges() throws Exception {
ensureFollowerGreen("index2");

for (int i = 0; i < firstBatchNumDocs; i++) {
assertBusy(assertExpectedDocumentRunnable(i));
assertBusy(assertExpectedDocumentRunnable(i), 1, TimeUnit.MINUTES);
}

final int secondBatchNumDocs = randomIntBetween(2, 64);
Expand All @@ -301,7 +303,7 @@ public void testFollowIndexWithConcurrentMappingChanges() throws Exception {
}

for (int i = firstBatchNumDocs; i < firstBatchNumDocs + secondBatchNumDocs; i++) {
assertBusy(assertExpectedDocumentRunnable(i));
assertBusy(assertExpectedDocumentRunnable(i), 1, TimeUnit.MINUTES);
}

isRunning.set(false);
Expand Down

0 comments on commit 11ddf27

Please sign in to comment.