Skip to content

Commit 4bdec22

Browse files
Automatic merge of master into galahad
2 parents be09613 + 2a0f45b commit 4bdec22

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

compiler/src/jdk.graal.compiler.test/src/jdk/graal/compiler/debug/test/CompilationAlarmPhaseTimesTest.java

+1-10
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,6 @@ protected void run(StructuredGraph graph, LowTierContext context) {
7373
*/
7474
public static final int SLEEP_SECONDS = 10;
7575

76-
/**
77-
* Thread.sleep is using nanoTime and compilation alarm uses System.currenTimeMillis which is a
78-
* different timer so there can be small imprecision. We allow this amount milliseconds total
79-
* imprecision.
80-
*/
81-
public static final int IMPRECISION_DELTA = 100;
82-
8376
@Test
8477
public void testTimeOutRetryToString() {
8578
final double secondsToWait = 1D;
@@ -103,9 +96,7 @@ public void testTimeOutRetryToString() {
10396
duration += c;
10497
index++;
10598
}
106-
final double scaledSecondsToWait = CompilationAlarm.scaleExpirationPeriod(secondsToWait, opt);
107-
assert Integer.parseInt(duration) >= (scaledSecondsToWait * 1000) -
108-
IMPRECISION_DELTA : String.format("Must at least wait for 2000ms but waited %s error was %s", duration, message);
99+
assert Integer.parseInt(duration) > 0 : String.format("Must at least wait some positive amount of time but waited %s error was %s", duration, message);
109100
}
110101
}
111102

0 commit comments

Comments
 (0)