Skip to content

Commit 206bf9f

Browse files
committed
Adapt TKit to Java 21
1 parent 3f3bd30 commit 206bf9f

File tree

1 file changed

+2
-1
lines changed
  • test/jdk/tools/jpackage/helpers/jdk/jpackage/test

1 file changed

+2
-1
lines changed

test/jdk/tools/jpackage/helpers/jdk/jpackage/test/TKit.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,8 @@ private static void waitForFileCreated(Path fileToWaitFor, Duration timeout) thr
551551

552552
var waitUntil = Instant.now().plus(timeout);
553553
for (;;) {
554-
var remainderTimeout = Instant.now().until(waitUntil);
554+
Instant n = Instant.now();
555+
Duration remainderTimeout = Duration.between(n, waitUntil);
555556
assertTrue(remainderTimeout.isPositive(), String.format(
556557
"Check timeout value %dms is positive", remainderTimeout.toMillis()));
557558

0 commit comments

Comments
 (0)