RFR: 7904104: intermittent test failure in TimeoutDefaultSecondsWaiter
Christian Stein
cstein at openjdk.org
Tue Dec 2 13:51:49 UTC 2025
On Tue, 28 Oct 2025 03:09:59 GMT, Vladimir Petko <vpetko at openjdk.org> wrote:
> `victim.interrupt()` is not needed if the process exits after the kill signal.
> This PR only calls interrupt() if the process fails to exit or the wait is interrupted for some reason.
>
> This allows TimeoutDefaultSecondsWaiter tests to pass.
>
> Alternative: update assertion in TimeoutDefaultSecondsWaiter test.
@jonathan-gibbons and others correct me if I'm reading the comment in `src/share/classes/com/sun/javatest/regtest/exec/ProcessCommand.java` wrong,
> ```java
> // JDK 1.8 introduces a Process.waitFor(timeout) method which could
> // be used here. We need run on 1.5 so using interrupt() instead.
>
> victim.interrupt();
> ```
but here it is about to replace:
`int exitCode = process.waitFor();`
with
`int exitCode = process.waitFor(TIMEOUT);`
and remove the custom "victim" timeout thread entirely. Right?
-------------
PR Comment: https://git.openjdk.org/jtreg/pull/296#issuecomment-3602176456
More information about the jtreg-dev
mailing list