RFR: 8356438: Update OutputAnalyzer to optionally print process output as it happens [v2]
Matthew Donovan
mdonovan at openjdk.org
Sun Jul 20 17:21:41 UTC 2025
On Wed, 18 Jun 2025 04:41:06 GMT, David Holmes <dholmes at openjdk.org> wrote:
>
> I see a few tests that do that, nearly all of which are network tests. It is not something I was familiar with. But it doesn't seem right to me that a particular test would use that property to change the behaviour of `OutputAnalyzer`. I also don't think the test should have to opt-in to this kind of behaviour rather than it being directly controlled by the person running the tests. To that end I would see `OutputAnalyzer` examining a specific property, e.g. `OutputAnalyzer.printToStdStreams` to control this.
I didn't mean to suggest that `OutputAnalyzer` uses the `test.debug` property directly, only that if `OutpuAnalyzer` had a constructor that took a boolean argument, the argument _could_ be set based on the value of `test.debug`...
`OutputAnalyzer oa = new OutputAnalyzer(myProcess, Boolean.getBoolean("test.debug"));`
-------------
PR Comment: https://git.openjdk.org/jdk/pull/25587#issuecomment-3094659115
More information about the core-libs-dev
mailing list