Line 106 of the test reads:
System.out.printf("elapsed=%d%n", System.currentTimeMillis() - start);
This printf() call is rather expensive: it takes too much time on slow machines (typically solaris-sparc in Xcomp mode).
As a result, the timer is not cancelled in time and the test fails.
To reproduce, just compile the test standalone and run it on a sufficiently slow machine (v240-class machine should do) in Xcomp mode with any recent java 6 or 7 (verified with 6u7, 7b32).
System.out.printf("elapsed=%d%n", System.currentTimeMillis() - start);
This printf() call is rather expensive: it takes too much time on slow machines (typically solaris-sparc in Xcomp mode).
As a result, the timer is not cancelled in time and the test fails.
To reproduce, just compile the test standalone and run it on a sufficiently slow machine (v240-class machine should do) in Xcomp mode with any recent java 6 or 7 (verified with 6u7, 7b32).