Skip to content

Commit

Permalink
SNAPSHOT+TESTS: Stabilize SnapshotDisruptionIT
Browse files Browse the repository at this point in the history
* Ensure retry by busy assert on SnapshotMissingException
* Closes elastic#36739
  • Loading branch information
original-brownbear committed Jan 10, 2019
1 parent d625b79 commit 7990faf
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ protected Settings nodeSettings(int nodeOrdinal) {
.build();
}

@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/36779")
public void testDisruptionOnSnapshotInitialization() throws Exception {
final String idxName = "test";
final List<String> allMasterEligibleNodes = internalCluster().startMasterOnlyNodes(3);
Expand Down Expand Up @@ -180,7 +179,11 @@ public void clusterChanged(ClusterChangedEvent event) {

logger.info("--> verify that snapshot eventually will be created due to retries");
assertBusy(() -> {
assertSnapshotExists("test-repo", "test-snap-2");
try {
assertSnapshotExists("test-repo", "test-snap-2");
} catch (SnapshotMissingException ex) {
throw new AssertionError(ex);
}
}, 1, TimeUnit.MINUTES);
}

Expand Down

0 comments on commit 7990faf

Please sign in to comment.