Skip to content

Commit 71c8aea

Browse files
committed
Ignore warning for index creation prefixed by a dot during cluster settings wipe
1 parent 13f3864 commit 71c8aea

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

muted-tests.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -420,9 +420,6 @@ tests:
420420
- class: org.elasticsearch.indices.stats.IndexStatsIT
421421
method: testThrottleStats
422422
issue: https://github.com/elastic/elasticsearch/issues/126359
423-
- class: org.elasticsearch.xpack.remotecluster.RemoteClusterSecurityRestIT
424-
method: testTaskCancellation
425-
issue: https://github.com/elastic/elasticsearch/issues/128009
426423
- class: org.elasticsearch.xpack.esql.action.CrossClusterQueryWithPartialResultsIT
427424
method: testOneRemoteClusterPartial
428425
issue: https://github.com/elastic/elasticsearch/issues/124055

test/framework/src/main/java/org/elasticsearch/test/rest/ESRestTestCase.java

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1369,13 +1369,16 @@ private static void wipeClusterSettings() throws IOException {
13691369

13701370
if (mustClear.get()) {
13711371
request.setOptions(RequestOptions.DEFAULT.toBuilder().setWarningsHandler(warnings -> {
1372-
if (warnings.isEmpty()) {
1373-
return false;
1374-
} else if (warnings.size() > 1) {
1375-
return true;
1376-
} else {
1377-
return warnings.get(0).contains("xpack.monitoring") == false;
1372+
for (String warning : warnings) {
1373+
if (warning.contains("xpack.monitoring")) {
1374+
SUITE_LOGGER.warn("Ignoring xpack monitoring warning during test cleanup: {}", warning);
1375+
} else if (warning.contains("name begins with a dot")) {
1376+
SUITE_LOGGER.warn("Ignoring dot prefix warning during test cleanup: {}", warning);
1377+
} else {
1378+
return true;
1379+
}
13781380
}
1381+
return false;
13791382
}));
13801383
cleanupClient().performRequest(request);
13811384
}

0 commit comments

Comments
 (0)