RFR: 8134459: java/util/stream/test/org/openjdk/tests/java/util/stream/WhileOpTest.java timed out

Joseph D. Darcy joe.darcy at oracle.com
Tue Jan 9 22:58:49 UTC 2018


Making tests run faster is all good of course. However, I'm leery of 
bumping up the timeouts; I'd prefer the tests be split into multiple 
parts if there is a chance it will take many minutes to run. (Having 
individual regression tests run in at most a minute or two helps avoid 
Amdahl's law problems when running the regression tests with concurrency.)



On 1/9/2018 1:15 PM, Claes Redestad wrote:
> Hi,
> the 
> java/util/stream/test/org/openjdk/tests/java/util/stream/WhileOpTest.java 
> has
> started timing out locallty on my machine, and analyzing why it seems 
> it simply has
> added enough test cases recently to hit the default 120s timeout.
> Quickly analyzing what is taking so much time I ran into an 
> inefficiency in TestNGs
> assertEquals(Iterator<?>, Iterator<?>) implementation, where at least 
> one error message
> string is created unconditionally in an inner loop, leading to quite a 
> bit of allocation
> pressure in a test like WhileOpTest.
> On my machine, avoiding this extra work speeds up the test from taking 
> around ~130s
> to ~100s. A good improvement, but still somewhat close to the default 
> 120s timeout.
> So as a fix I propose:
> - work around this by providing simplified assert methods in the 
> LambdaTestHelper that
> avoid the excessively allocating methods in TestNG
> - increasing the timeout of WhileOpTest to 240s
> http://cr.openjdk.java.net/~redestad/8134459/open.00/
> Regards
> /Claes

More information about the core-libs-dev mailing list