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 flaky test ArchivedIndexSettingsIT #9515

Merged
merged 5 commits into from
Aug 25, 2023
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
Next Next commit
Fix flaky test ArchivedIndexSettingsIT
Signed-off-by: Ankit Kala <ankikala@amazon.com>
  • Loading branch information
ankitkala committed Aug 23, 2023
commit 43f1bb5c461170e50422a1f5d97478d9ed72d384
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.concurrent.TimeUnit;

import static org.hamcrest.Matchers.startsWith;

Expand Down Expand Up @@ -48,12 +49,26 @@ public void testArchiveSettings() throws Exception {
internalCluster().restartNode(newClusterManagerNode);

// Verify that archived settings exists.
assertTrue(
client().admin().indices().prepareGetSettings("test").get().getIndexToSettings().get("test").hasValue("archived.index.dummy")
);
assertTrue(
client().admin().indices().prepareGetSettings("test").get().getIndexToSettings().get("test").hasValue("archived.index.dummy2")
);
assertBusy(() -> {
assertTrue(
client().admin()
.indices()
.prepareGetSettings("test")
.get()
.getIndexToSettings()
.get("test")
.hasValue("archived.index.dummy")
);
assertTrue(
client().admin()
.indices()
.prepareGetSettings("test")
.get()
.getIndexToSettings()
.get("test")
.hasValue("archived.index.dummy2")
);
}, 30, TimeUnit.SECONDS);

// Archived setting update should fail on open index.
IllegalArgumentException exception = expectThrows(
Expand Down