Skip to content

Commit 923aa25

Browse files
Fix testIndexDeletionDuringSnapshotCreationInQueue flaky test (#11726) (#11727)
* Fix testIndexDeletionDuringSnapshotCreationInQueue flaky test * Update comment --------- (cherry picked from commit 8440468) Signed-off-by: Suraj Singh <[email protected]> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 8efcd9a commit 923aa25

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

server/src/internalClusterTest/java/org/opensearch/snapshots/DedicatedClusterSnapshotRestoreIT.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1497,6 +1497,13 @@ public void testIndexDeletionDuringSnapshotCreationInQueue() throws Exception {
14971497

14981498
clusterAdmin().prepareRestoreSnapshot("test-repo", "test-snap").get();
14991499
ensureGreen("test-idx");
1500+
1501+
// Wait for snapshot process to complete to prevent conflict with repository clean up
1502+
assertBusy(() -> {
1503+
SnapshotInfo snapshotInfo = getSnapshot("test-repo", "test-snap-2");
1504+
assertTrue(snapshotInfo.state().completed());
1505+
assertEquals(SnapshotState.PARTIAL, snapshotInfo.state());
1506+
}, 1, TimeUnit.MINUTES);
15001507
}
15011508

15021509
private long calculateTotalFilesSize(List<Path> files) {

0 commit comments

Comments
 (0)