Handle new exception when testing invalid tokens
This commit adds handling for a new exception in
AuthenticationServiceTests#testInvalidToken. The new exceptions was
added in where we stopped supporting older version tokens by
default.
Closes
@@ -1175,6 +1175,9 @@ public class AuthenticationServiceTests extends ESTestCase {
} else if (e instanceof NegativeArraySizeException) {
assertThat(e.getMessage(), containsString("array size must be positive but was: "));
latch.countDown();
+ } else if (e instanceof IllegalArgumentException) {
+ assertThat(e.getMessage(), containsString("Cannot authenticate using token from version"));
+ latch.countDown();
} else {
logger.error("unexpected exception", e);
latch.countDown();
