RFR: 8351639: Improve debuggability of test/langtools/jdk/jshell/JdiHangingListenExecutionControlTest.java test
Jan Lahoda
jlahoda at openjdk.org
Tue Mar 11 13:20:57 UTC 2025
On Tue, 11 Mar 2025 10:43:31 GMT, Jaikiran Pai <jpai at openjdk.org> wrote:
> Can I please get a review of this test-only change which proposes to improve the debuggability of `test/langtools/jdk/jshell/JdiHangingListenExecutionControlTest.java` when it fails intermittently?
>
> This test has failed a few times in the CI and as noted in the description of https://bugs.openjdk.org/browse/JDK-8351639, the failure happens when the test doesn't find the expected exception message in the `IllegalStateException` that gets thrown. When I initially filed that issue, I thought the (unexpected) exception message wasn't being printed. But turns out the `assertTrue(...)` call does indeed print the original exception message:
>
>> Launching JShell execution engine threw: Failed remote listen: java.util.concurrent.ExecutionException: com.sun.jdi.connect.TransportTimeoutException: timeout waiting for connection @ com.sun.jdi.SocketListen (defaults: timeout=, port=, localAddress=) -- {timeout=timeout=8000, port=port=59547, localAddress=localAddress=}
>
> Even so, I think the proposed change in this PR to rethrow the original exception and thus have the entire exception stacktrace available for analysis would be useful for any such failures in future.
>
> The test continues to pass with this change.
Looks reasonable to me. Thanks!
-------------
Marked as reviewed by jlahoda (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/23978#pullrequestreview-2674494131
More information about the kulla-dev
mailing list