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

David Holmes dholmes at openjdk.java.net
Wed Sep 15 22:58:52 UTC 2021

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