[TEST] Catch ISE instead of IAE for illegal array size
relates elastic/x-pack-elasticsearch#2493 Original commit: elastic/x-pack-elasticsearch@605dcebf0e
This commit is contained in:
parent
08a35d44c6
commit
3dd9445f4b
|
@ -845,7 +845,7 @@ public class AuthenticationServiceTests extends ESTestCase {
|
||||||
success.set(true);
|
success.set(true);
|
||||||
latch.countDown();
|
latch.countDown();
|
||||||
}, this::logAndFail));
|
}, this::logAndFail));
|
||||||
} catch (IllegalArgumentException ex) {
|
} catch (IllegalStateException ex) {
|
||||||
assertThat(ex.getMessage(), containsString("array length must be <= to " + ArrayUtil.MAX_ARRAY_LENGTH + " but was: "));
|
assertThat(ex.getMessage(), containsString("array length must be <= to " + ArrayUtil.MAX_ARRAY_LENGTH + " but was: "));
|
||||||
latch.countDown();
|
latch.countDown();
|
||||||
} catch (NegativeArraySizeException ex) {
|
} catch (NegativeArraySizeException ex) {
|
||||||
|
|
Loading…
Reference in New Issue