RFR: 8333358: java/io/IO/IO.java test fails intermittently [v3]

Alan Bateman alanb at openjdk.org
Thu Jun 13 06:32:14 UTC 2024


On Wed, 12 Jun 2024 19:06:23 GMT, Pavel Rappo <prappo at openjdk.org> wrote:

>> Please review this fix for an intermittent test failure.
>> 
>> On some configurations, the default `expect` timeout of 10 seconds is insufficient. It is increased to 20; it's hard to imagine a configuration for which that new value would still be insufficient, but we'll see.
>> 
>> Aside from that, test-generated diagnostics are improved: the version of the `expect` command and the duration of each test method are recorded. `output.exp` is modified for robustness and clear indication of the timeout condition.
>> 
>> I was reminded, out-of-band, that test timeouts should be scaled with `test.timeout.factor`. I propose to integrate this PR first and then separately update all the affected tests to scale their `expect` timeouts.
>
> Pavel Rappo has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Disable timeout in expect scripts

test/jdk/java/io/IO/IO.java line 192:

> 190:     // adapted from https://junit.org/junit5/docs/current/user-guide/#extensions-lifecycle-callbacks-timing-extension
> 191: 
> 192:     public static class TimingExtension implements BeforeTestExecutionCallback,

In passing, this feels like infrastructure that we could use in several areas as it regularly comes up as to how long specific tests take (the "seconds" line recorded by jtreg in the .jtr file is too coarse grain when there are many tests in the same source file).

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/19627#discussion_r1637622775


More information about the core-libs-dev mailing list