Skip to content
Merged
Show file tree
Hide file tree
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
3 changes: 0 additions & 3 deletions muted-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -399,9 +399,6 @@ tests:
- class: org.elasticsearch.xpack.test.rest.XPackRestIT
method: test {p0=transform/transforms_start_stop/Test start/stop only starts/stops specified transform}
issue: https://github.com/elastic/elasticsearch/issues/126466
- class: org.elasticsearch.xpack.downsample.ILMDownsampleDisruptionIT
method: testILMDownsampleRollingRestart
issue: https://github.com/elastic/elasticsearch/issues/126495
- class: org.elasticsearch.smoketest.MlWithSecurityIT
method: test {yaml=ml/get_trained_model_stats/Test get stats given trained models}
issue: https://github.com/elastic/elasticsearch/issues/126510
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1735,15 +1735,23 @@ public static boolean indexExists(String index, Client client) {
}

public static void awaitIndexExists(String index) {
awaitIndexExists(index, client());
awaitIndexExists(index, client(), SAFE_AWAIT_TIMEOUT);
}

public static void awaitIndexExists(String index, TimeValue timeout) {
awaitIndexExists(index, client(), timeout);
}

public static void awaitIndexExists(String index, Client client) {
awaitIndexExists(index, client, SAFE_AWAIT_TIMEOUT);
}

public static void awaitIndexExists(String index, Client client, TimeValue timeout) {
assertThat("wildcards not supported", index, allOf(not(Metadata.ALL), not(containsString("*"))));
safeGet(
client.admin()
.cluster()
.prepareHealth(SAFE_AWAIT_TIMEOUT, index)
.prepareHealth(timeout, index)
.setIndicesOptions(IndicesOptions.LENIENT_EXPAND_OPEN_CLOSED)
.execute()
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,8 @@ private void startDownsampleTaskViaIlm(String sourceIndex, String targetIndex) t
throw new AssertionError(e);
}
}, 1, TimeUnit.MINUTES);
awaitIndexExists(targetIndex, TimeValue.timeValueSeconds(60));
assertBusy(() -> {
assertTrue("target index [" + targetIndex + "] does not exist", indexExists(targetIndex));
var getSettingsResponse = client().admin()
.indices()
.getSettings(new GetSettingsRequest(TEST_REQUEST_TIMEOUT).indices(targetIndex))
Expand Down