RFR: 8351639: Improve debuggability of test/langtools/jdk/jshell/JdiHangingListenExecutionControlTest.java test
Jaikiran Pai
jpai at openjdk.org
Wed Mar 12 06:59:56 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.
Thank you Jan for the review. I ran these test with a test repeat of 50 in our CI and it hasn't regressed. I will go ahead and integrate this now. Hopefully when this fails the next time, we will have some additional details to investigate.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/23978#issuecomment-2716733214
More information about the kulla-dev
mailing list