RFR 8169838 java/util/Spliterator/SpliteratorTraversingAndSplittingTest.java failed intermittently

Martin Buchholz martinrb at google.com
Thu Nov 17 19:14:53 UTC 2016


Thanks!  Reviewed.

In jsr166 tck we introduced the idea of "expensive" tests that only get run
when enough resources are available.

http://gee.cs.oswego.edu/cgi-bin/viewcvs.cgi/jsr166/src/test/tck/ArrayDeque8Test.java?view=markup

    /**
     * Handle capacities near Integer.MAX_VALUE.
     * ant -Dvmoptions='-Xms28g -Xmx28g'
-Djsr166.testImplementationDetails=true -Djsr166.expensiveTests=true
-Djsr166.tckTestClass=ArrayDequeTest -Djsr166.methodFilter=testHuge tck
     */
    public void testHuge() {
        if (! (testImplementationDetails
               && expensiveTests
               && Runtime.getRuntime().maxMemory() > 24L * (1 << 30)))
            return;


On Thu, Nov 17, 2016 at 10:08 AM, Paul Sandoz <paul.sandoz at oracle.com>
wrote:

> Hi,
>
> Please review this small update to the spliterator traversing test to
> remove test cases for BitSet when the Integer.MAX_VALUE bit (or close to)
> is set.
>
> diff -r 382f7f3a1888 test/java/util/Spliterator/
> SpliteratorTraversingAndSplittingTest.java
> --- a/test/java/util/Spliterator/SpliteratorTraversingAndSplittingTest.java
>    Wed Nov 16 14:26:14 2016 -0800
> +++ b/test/java/util/Spliterator/SpliteratorTraversingAndSplittingTest.java
>    Thu Nov 17 10:03:56 2016 -0800
> @@ -892,9 +892,6 @@
>                  { "index 0", IntStream.of(0).toArray() },
>                  { "index 255", IntStream.of(255).toArray() },
>                  { "index 0 and 255", IntStream.of(0, 255).toArray() },
> -                { "index Integer.MAX_VALUE", IntStream.of(Integer.MAX_VALUE).toArray()
> },
> -                { "index Integer.MAX_VALUE - 1",
> IntStream.of(Integer.MAX_VALUE - 1).toArray() },
> -                { "index 0 and Integer.MAX_VALUE", IntStream.of(0,
> Integer.MAX_VALUE).toArray() },
>                  { "every bit", IntStream.range(0, 255).toArray() },
>                  { "step 2", IntStream.range(0, 255).map(f -> f *
> 2).toArray() },
>                  { "step 3", IntStream.range(0, 255).map(f -> f *
> 3).toArray() },
>
> Such cases are causing out of memory test failures (not reproduced when
> running locally).
>
>
> Separately, we need to refactor the spliterator traversing tests into a
> separate library (which should anyway be done):
>
>   https://bugs.openjdk.java.net/browse/JDK-8169903
>
> And then add specific BitSet tests with large memory requirements.
>
> Thanks,
> Paul.
>


More information about the core-libs-dev mailing list