RFR: 8351639: Improve debuggability of test/langtools/jdk/jshell/JdiHangingListenExecutionControlTest.java test

Jaikiran Pai jpai at openjdk.org
Tue Mar 11 10:48:19 UTC 2025


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.

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

Commit messages:
 - 8351639: Improve debuggability of test/langtools/jdk/jshell/JdiHangingListenExecutionControlTest.java test

Changes: https://git.openjdk.org/jdk/pull/23978/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=23978&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8351639
  Stats: 6 lines in 1 file changed: 4 ins; 0 del; 2 mod
  Patch: https://git.openjdk.org/jdk/pull/23978.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/23978/head:pull/23978

PR: https://git.openjdk.org/jdk/pull/23978


More information about the kulla-dev mailing list