|
30 | 30 | import java.io.IOException; |
31 | 31 | import java.nio.ByteBuffer; |
32 | 32 |
|
| 33 | +import org.junit.Assume; |
33 | 34 | import org.junit.Assert; |
34 | 35 | import org.junit.Test; |
35 | 36 | import org.xerial.util.log.Logger; |
@@ -415,31 +416,37 @@ public void isValidArrayInputLength() |
415 | 416 | */ |
416 | 417 | @Test(expected = SnappyError.class) |
417 | 418 | public void isTooLargeDoubleArrayInputLength() throws Exception { |
| 419 | + assumingCIIsFalse(); |
418 | 420 | Snappy.compress(new double[Integer.MAX_VALUE / 8 + 1]); |
419 | 421 | } |
420 | 422 |
|
421 | 423 | @Test(expected = SnappyError.class) |
422 | 424 | public void isTooLargeCharArrayInputLength() throws Exception { |
| 425 | + assumingCIIsFalse(); |
423 | 426 | Snappy.compress(new char[Integer.MAX_VALUE / 2 + 1]); |
424 | 427 | } |
425 | 428 |
|
426 | 429 | @Test(expected = SnappyError.class) |
427 | 430 | public void isTooLargeFloatArrayInputLength() throws Exception { |
| 431 | + assumingCIIsFalse(); |
428 | 432 | Snappy.compress(new float[Integer.MAX_VALUE / 4 + 1]); |
429 | 433 | } |
430 | 434 |
|
431 | 435 | @Test(expected = SnappyError.class) |
432 | 436 | public void isTooLargeIntArrayInputLength() throws Exception { |
| 437 | + assumingCIIsFalse(); |
433 | 438 | Snappy.compress(new int[Integer.MAX_VALUE / 4 + 1]); |
434 | 439 | } |
435 | 440 |
|
436 | 441 | @Test(expected = SnappyError.class) |
437 | 442 | public void isTooLargeLongArrayInputLength() throws Exception { |
| 443 | + assumingCIIsFalse(); |
438 | 444 | Snappy.compress(new long[Integer.MAX_VALUE / 8 + 1]); |
439 | 445 | } |
440 | 446 |
|
441 | 447 | @Test(expected = SnappyError.class) |
442 | 448 | public void isTooLargeShortArrayInputLength() throws Exception { |
| 449 | + assumingCIIsFalse(); |
443 | 450 | Snappy.compress(new short[Integer.MAX_VALUE / 2 + 1]); |
444 | 451 | } |
445 | 452 |
|
@@ -474,28 +481,37 @@ public void isValidArrayInputLengthForBitShuffleShuffle() |
474 | 481 | */ |
475 | 482 | @Test(expected = SnappyError.class) |
476 | 483 | public void isTooLargeDoubleArrayInputLengthForBitShuffleShuffle() throws Exception { |
| 484 | + assumingCIIsFalse(); |
477 | 485 | BitShuffle.shuffle(new double[Integer.MAX_VALUE / 8 + 1]); |
478 | 486 | } |
479 | 487 |
|
480 | 488 | @Test(expected = SnappyError.class) |
481 | 489 | public void isTooLargeFloatArrayInputLengthForBitShuffleShuffle() throws Exception { |
| 490 | + assumingCIIsFalse(); |
482 | 491 | BitShuffle.shuffle(new float[Integer.MAX_VALUE / 4 + 1]); |
483 | 492 | } |
484 | 493 |
|
485 | 494 | @Test(expected = SnappyError.class) |
486 | 495 | public void isTooLargeIntArrayInputLengthForBitShuffleShuffle() throws Exception { |
| 496 | + assumingCIIsFalse(); |
487 | 497 | BitShuffle.shuffle(new float[Integer.MAX_VALUE / 4 + 1]); |
488 | 498 | } |
489 | 499 |
|
490 | 500 | @Test(expected = SnappyError.class) |
491 | 501 | public void isTooLargeLongArrayInputLengthForBitShuffleShuffle() throws Exception { |
| 502 | + assumingCIIsFalse(); |
492 | 503 | BitShuffle.shuffle(new long[Integer.MAX_VALUE / 8 + 1]); |
493 | 504 | } |
494 | 505 |
|
495 | 506 | @Test(expected = SnappyError.class) |
496 | 507 | public void isTooLargeShortArrayInputLengthForBitShuffleShuffle() throws Exception { |
| 508 | + assumingCIIsFalse(); |
497 | 509 | BitShuffle.shuffle(new short[Integer.MAX_VALUE / 2 + 1]); |
| 510 | + } |
498 | 511 |
|
499 | | - |
| 512 | + private void assumingCIIsFalse() { |
| 513 | + if (System.getenv("CI") == null) |
| 514 | + return; |
| 515 | + Assume.assumeFalse("Skipped on CI", System.getenv("CI").equals("true")); |
500 | 516 | } |
501 | 517 | } |
0 commit comments