Skip to content

Commit

Permalink
Fix testIndexDeletionDuringSnapshotCreationInQueue flaky test (#11726)
Browse files Browse the repository at this point in the history
* Fix testIndexDeletionDuringSnapshotCreationInQueue flaky test

Signed-off-by: Suraj Singh <[email protected]>

* Update comment

Signed-off-by: Suraj Singh <[email protected]>

---------

Signed-off-by: Suraj Singh <[email protected]>
  • Loading branch information
dreamer-89 authored Jan 3, 2024
1 parent bb3959d commit 8440468
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1457,6 +1457,13 @@ public void testIndexDeletionDuringSnapshotCreationInQueue() throws Exception {

clusterAdmin().prepareRestoreSnapshot("test-repo", "test-snap").get();
ensureGreen("test-idx");

// Wait for snapshot process to complete to prevent conflict with repository clean up
assertBusy(() -> {
SnapshotInfo snapshotInfo = getSnapshot("test-repo", "test-snap-2");
assertTrue(snapshotInfo.state().completed());
assertEquals(SnapshotState.PARTIAL, snapshotInfo.state());
}, 1, TimeUnit.MINUTES);
}

private long calculateTotalFilesSize(List<Path> files) {
Expand Down

0 comments on commit 8440468

Please sign in to comment.