[TEST] Catch ISE instead of IAE for illegal array size
relates elastic/x-pack-elasticsearch#2493
Original commit: elastic/x-pack-elasticsearch@0952021b8a4c8d1590a2b2816e470f4175e56648
@@ -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) {
