Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix DedicatedClusterSnapshotRestoreIT testSnapshotWithStuckNode #43537

Merged
merged 3 commits into from
Jun 25, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,6 @@ public void testSnapshotDuringNodeShutdown() throws Exception {
logger.info("--> done");
}

@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/39852")
public void testSnapshotWithStuckNode() throws Exception {
logger.info("--> start 2 nodes");
ArrayList<String> nodes = new ArrayList<>();
Expand Down Expand Up @@ -483,11 +482,20 @@ public void testSnapshotWithStuckNode() throws Exception {
}

logger.info("--> making sure that snapshot no longer exists");
assertThrows(client().admin().cluster().prepareGetSnapshots("test-repo").setSnapshots("test-snap").execute(),
SnapshotMissingException.class);
expectThrows(SnapshotMissingException.class,
() -> client().admin().cluster().prepareGetSnapshots("test-repo").setSnapshots("test-snap")
.execute().actionGet().getSnapshots("test-repo"));

logger.info("--> Go through a loop of creating and deleting a snapshot to trigger repository cleanup");
client().admin().cluster().prepareCreateSnapshot("test-repo", "test-snap-tmp")
.setWaitForCompletion(true)
.setIndices("test-idx")
.get();
client().admin().cluster().prepareDeleteSnapshot("test-repo", "test-snap-tmp").get();

// Subtract four files that will remain in the repository:
// (1) index-1
// (2) index-0 (because we keep the previous version) and
// (1) index-(N+1)
// (2) index-N (because we keep the previous version) and
// (3) index-latest
// (4) incompatible-snapshots
assertFileCount(repo, 4);
Expand Down