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

[Backport 2.x] Fix testIndexDeletionDuringSnapshotCreationInQueue flaky test #11727

Merged
merged 1 commit into from
Jan 3, 2024
Merged
Changes from all commits
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
Fix testIndexDeletionDuringSnapshotCreationInQueue flaky test (#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]>
(cherry picked from commit 8440468)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
github-actions[bot] committed Jan 3, 2024
commit 6cff59a7bca0347e532df7e3bf70c3bade3c947d
Original file line number Diff line number Diff line change
@@ -1497,6 +1497,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) {