RFR: 8207166: jdk/jshell/JdiHangingLaunchExecutionControlTest.java - launch timeout
Daniel D. Daugherty
dcubed at openjdk.org
Fri Aug 26 19:44:36 UTC 2022
On Fri, 26 Aug 2022 19:30:02 GMT, Daniel D. Daugherty <dcubed at openjdk.org> wrote:
> A trivial fix to scale time values for HangingRemoteAgent.java by JTREG timeoutFactor.
> Also cleaned up an incorrect comment.
Gory details:
JdiHangingLaunchExecutionControlTest.java uses
HangingRemoteAgent.java to test that a launcher
timeout is properly detected.
HangingRemoteAgent.java uses two hardcoded delay values:
private static final long DELAY = 4000L;
private static final int TIMEOUT = 2000;
The TIMEOUT value is passed to the launcher mechanism
so the launcher mechanism is given 2 seconds to issue:
Launching JShell execution engine threw: Accept timed out
and the DELAY value is how long the HangingRemoteAgent
main() will loop in order to give the launcher time to fail.
There is also an incorrect comment in HangingRemoteAgent.java:
* Hang for three minutes (long enough to cause a timeout).
I went back to the original integration of HangingRemoteAgent.java
and that comment has been there since the initial integration on
2016.11.22.
It looks like the intended algorithm is for the HangingRemoteAgent
main() to loop for 2X the timeout value. The timeout value itself
should be scaled by the JTREG timeoutFactor.
-------------
PR: https://git.openjdk.org/jdk/pull/10049
More information about the compiler-dev
mailing list