diff --git a/compiler/src/jdk.graal.compiler.test/src/jdk/graal/compiler/debug/test/CompilationAlarmPhaseTimesTest.java b/compiler/src/jdk.graal.compiler.test/src/jdk/graal/compiler/debug/test/CompilationAlarmPhaseTimesTest.java index a91aefc89fee..b56c2ec8c599 100644 --- a/compiler/src/jdk.graal.compiler.test/src/jdk/graal/compiler/debug/test/CompilationAlarmPhaseTimesTest.java +++ b/compiler/src/jdk.graal.compiler.test/src/jdk/graal/compiler/debug/test/CompilationAlarmPhaseTimesTest.java @@ -73,13 +73,6 @@ protected void run(StructuredGraph graph, LowTierContext context) { */ public static final int SLEEP_SECONDS = 10; - /** - * Thread.sleep is using nanoTime and compilation alarm uses System.currenTimeMillis which is a - * different timer so there can be small imprecision. We allow this amount milliseconds total - * imprecision. - */ - public static final int IMPRECISION_DELTA = 100; - @Test public void testTimeOutRetryToString() { final double secondsToWait = 1D; @@ -103,9 +96,7 @@ public void testTimeOutRetryToString() { duration += c; index++; } - final double scaledSecondsToWait = CompilationAlarm.scaleExpirationPeriod(secondsToWait, opt); - assert Integer.parseInt(duration) >= (scaledSecondsToWait * 1000) - - IMPRECISION_DELTA : String.format("Must at least wait for 2000ms but waited %s error was %s", duration, message); + assert Integer.parseInt(duration) > 0 : String.format("Must at least wait some positive amount of time but waited %s error was %s", duration, message); } }