From e1ad392f9bbd6c56fe6ffb6fb7200b5a84b2e4cf Mon Sep 17 00:00:00 2001 From: Pr0methean <4961925+Pr0methean@users.noreply.github.com> Date: Fri, 15 Jun 2018 18:42:40 -0700 Subject: [PATCH] Treat getAccumulatedExecutionTimeAllThreads only as upper bound --- src/test/java/com/aparapi/runtime/ProfileReportNewAPITest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/com/aparapi/runtime/ProfileReportNewAPITest.java b/src/test/java/com/aparapi/runtime/ProfileReportNewAPITest.java index dc75a591..c767ed47 100644 --- a/src/test/java/com/aparapi/runtime/ProfileReportNewAPITest.java +++ b/src/test/java/com/aparapi/runtime/ProfileReportNewAPITest.java @@ -202,7 +202,7 @@ public class ProfileReportNewAPITest { assertEquals("Number of profiling reports doesn't match the expected", runs, state.receivedReportsCount); assertEquals("Aparapi Accumulated execution time doesn't match", kernel.getAccumulatedExecutionTimeAllThreads(device), state.accumulatedElapsedTime, 1e-10); - assertEquals("Test estimated accumulated time doesn't match within 250ms window", runTime, kernel.getAccumulatedExecutionTimeAllThreads(device), 250); + assertTrue("Test estimated accumulated time is over 200ms below wall time", runTime < kernel.getAccumulatedExecutionTimeAllThreads(device) + 250); for (int i = 0; i < runs; i++) { assertTrue("Report with id " + i + " wasn't received", observer.receivedReportIds[i]); } -- GitLab