Skip to content

Commit bf09c6b

Browse files
committed
ignore all exceptions from ILM cleanup in RestTestCase
1 parent 8bb2c05 commit bf09c6b

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

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

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -534,12 +534,8 @@ private static void deleteAllPolicies() throws IOException {
534534
Response response = adminClient().performRequest(new Request("GET", "/_ilm/policy"));
535535
policies = entityAsMap(response);
536536
} catch (ResponseException e) {
537-
int statusCode = e.getResponse().getStatusLine().getStatusCode();
538-
if (RestStatus.METHOD_NOT_ALLOWED.getStatus() == statusCode || RestStatus.BAD_REQUEST.getStatus() == statusCode) {
539-
// If bad request returned, ILM is not enabled.
540-
return;
541-
}
542-
throw e;
537+
// If bad request returned, ILM is not enabled.
538+
return;
543539
}
544540

545541
if (policies == null || policies.isEmpty()) {

0 commit comments

Comments
 (0)