RFR: 8336479: Provide Process.waitFor(Duration) [v5]

Chen Liang liach at openjdk.org
Thu Jul 18 21:26:31 UTC 2024


On Wed, 17 Jul 2024 21:42:15 GMT, Naoto Sato <naoto at openjdk.org> wrote:

>> This method needs to be overridden in `test/lib/jdk/test/lib/process/ProcessTools.java` to call `ProcessTools.ProcessImpl::waitForStreams`.
>
> I don't think current `ProcessTools.startProcess()` even calls `waitFor(long, TimeUnit)` let alone `waitFor(Duration)`. It is polling the process by itself to implement timeout. But I agree it is a good measure to add the override there, for the test to use it in the future.

Incidentally the same remark has been raised in https://github.com/openjdk/jdk/pull/20220#discussion_r1683352257 and addressed. Good enough for me! 😆

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20220#discussion_r1683523348


More information about the core-libs-dev mailing list