[crac] RFR: 8377562: [CRaC] Add better logging to RemoteJmxTest

Radim Vansa rvansa at openjdk.org
Wed Feb 11 10:02:34 UTC 2026


On Tue, 10 Feb 2026 13:34:39 GMT, Timofei Pushkin <tpushkin at openjdk.org> wrote:

> Makes `RemoteJmxTest` log stderr of the child process.

test/jdk/jdk/crac/RemoteJmxTest.java line 83:

> 81:                         System.out.println("[CHILD STDOUT] " + line);
> 82:                         if (!bootedFuture.isDone()) {
> 83:                             if (BOOTED.equals(line)) bootedFuture.complete(null);

This code looks like as if you expect that the messages could be printed multiple times; if that happens this should fail the test (for simplicity I wouldn't mind if it fails by timeout in the end, though, as long as the reason is printed earlier in the log).

I wonder if this could be consolidated with `CracProcess.waitForStdout()` (the least the lines are prefixed here. Maybe the best interface would be

CountDownLatch<Void> watch(String line, boolean positiveMatch);

(called repeatedly to get multiple latches), and `waitForStdout` would use that.

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

PR Review Comment: https://git.openjdk.org/crac/pull/295#discussion_r2789451757


More information about the crac-dev mailing list