RFR: 8272600: (test) Use native "sleep" in Basic.java [v4]

Bernd Eckenfels ecki at zusammenkunft.net
Wed Sep 15 23:12:32 UTC 2021

The message should probably more along the line of be „external sleep process terminated unexpected early“. But maybe it is better to actually fail the test when true is returned as it should not happen instead of diag output? (And for diag output the exit code would be more helpful than the time)


Von: core-libs-dev <core-libs-dev-retn at openjdk.java.net> im Auftrag von David Holmes <dholmes at openjdk.java.net>
Gesendet: Donnerstag, September 16, 2021 1:01 AM
An: core-libs-dev at openjdk.java.net
Betreff: Re: RFR: 8272600: (test) Use native "sleep" in Basic.java [v4]

On Wed, 15 Sep 2021 22:36:14 GMT, Roger Riggs <rriggs at openjdk.org> wrote:

>> test/jdk/java/lang/ProcessBuilder/Basic.java line 2452:
>>> 2450:
>>> 2451:             if (p.waitFor(10, TimeUnit.MILLISECONDS)) {
>>> 2452:                 System.out.println("WaitFor didn't wait long enough: " + (System.nanoTime() - start));
>> Either the condition or the message seems wrong here. If waitFor returns true then the process has exited and we obviously did wait long enough.
> This code is diagnostic.
> After switching to native sleep, I had intermittent failures claiming it did not sleep long enough.
> I was unable to find a specific cause for those failures.
> Many of the tests fail to check if the sleep processes terminate prematurely and if the executable is not found, it never launched.

Okay but my comment still stands.


PR: https://git.openjdk.java.net/jdk/pull/5239

More information about the core-libs-dev mailing list