diff --git a/plugin/src/test/java/org/elasticsearch/xpack/security/authc/AuthenticationServiceTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/authc/AuthenticationServiceTests.java index c1a17791551..57cb3cd7e82 100644 --- a/plugin/src/test/java/org/elasticsearch/xpack/security/authc/AuthenticationServiceTests.java +++ b/plugin/src/test/java/org/elasticsearch/xpack/security/authc/AuthenticationServiceTests.java @@ -845,7 +845,7 @@ public class AuthenticationServiceTests extends ESTestCase { success.set(true); latch.countDown(); }, this::logAndFail)); - } catch (IllegalArgumentException ex) { + } catch (IllegalStateException ex) { assertThat(ex.getMessage(), containsString("array length must be <= to " + ArrayUtil.MAX_ARRAY_LENGTH + " but was: ")); latch.countDown(); } catch (NegativeArraySizeException ex) {