File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
test/jdk/tools/jpackage/helpers/jdk/jpackage/test Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -526,7 +526,7 @@ public static void waitForFileCreated(Path fileToWaitFor,
526526 Duration timeout , Duration afterCreatedTimeout ) throws IOException {
527527 waitForFileCreated (fileToWaitFor , timeout );
528528 // Wait after the file has been created to ensure it is fully written.
529- ThrowingConsumer .<Duration >toConsumer (Thread ::sleep ).accept (afterCreatedTimeout );
529+ ThrowingConsumer .<Long >toConsumer (Thread ::sleep ).accept (afterCreatedTimeout . getSeconds () );
530530 }
531531
532532 private static void waitForFileCreated (Path fileToWaitFor , Duration timeout ) throws IOException {
@@ -543,7 +543,7 @@ private static void waitForFileCreated(Path fileToWaitFor, Duration timeout) thr
543543 for (;;) {
544544 Instant n = Instant .now ();
545545 Duration remainderTimeout = Duration .between (n , waitUntil );
546- assertTrue (remainderTimeout .isPositive (), String .format (
546+ assertTrue (! remainderTimeout .isNegative () && ! remainderTimeout . isZero (), String .format (
547547 "Check timeout value %dms is positive" , remainderTimeout .toMillis ()));
548548
549549 WatchKey key = ThrowingSupplier .toSupplier (() -> {
You can’t perform that action at this time.
0 commit comments