diff --git a/x-pack/plugin/security/qa/jwt-realm/src/javaRestTest/java/org/elasticsearch/xpack/security/authc/jwt/JwtUnavailableSecurityIndexRestIT.java b/x-pack/plugin/security/qa/jwt-realm/src/javaRestTest/java/org/elasticsearch/xpack/security/authc/jwt/JwtUnavailableSecurityIndexRestIT.java index 43fc967bcb9af..70ae679342207 100644 --- a/x-pack/plugin/security/qa/jwt-realm/src/javaRestTest/java/org/elasticsearch/xpack/security/authc/jwt/JwtUnavailableSecurityIndexRestIT.java +++ b/x-pack/plugin/security/qa/jwt-realm/src/javaRestTest/java/org/elasticsearch/xpack/security/authc/jwt/JwtUnavailableSecurityIndexRestIT.java @@ -201,18 +201,18 @@ private void assertAuthenticationHasUsernameAndRoles( ); } - private void restoreSecurityIndexAvailability() throws IOException { - Request openRequest = new Request("POST", "/.security/_open"); - openRequest.setOptions(systemIndexWarningHandlerOptions(".security-7")); - assertOK(adminClient().performRequest(openRequest)); - } - private void makeSecurityIndexUnavailable() throws IOException { Request closeRequest = new Request("POST", "/.security/_close"); closeRequest.setOptions(systemIndexWarningHandlerOptions(".security-7")); assertOK(adminClient().performRequest(closeRequest)); } + private void restoreSecurityIndexAvailability() throws IOException { + Request openRequest = new Request("POST", "/.security/_open"); + openRequest.setOptions(systemIndexWarningHandlerOptions(".security-7")); + assertOK(adminClient().performRequest(openRequest)); + } + private RequestOptions.Builder systemIndexWarningHandlerOptions(String index) { return RequestOptions.DEFAULT.toBuilder() .setWarningsHandler(