Skip to content

Commit

Permalink
Fix testIndexDeletionDuringSnapshotCreationInQueue flaky test (opense…
Browse files Browse the repository at this point in the history
…arch-project#11726)

* 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]>
Signed-off-by: Shivansh Arora <[email protected]>
  • Loading branch information
dreamer-89 authored and shiv0408 committed Apr 25, 2024
1 parent 57fed55 commit dbd2cc6
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 dbd2cc6

Please sign in to comment.