From 226b617722457edd5c774212e039564f790e8425 Mon Sep 17 00:00:00 2001 From: CoreRasurae Date: Tue, 16 Feb 2021 18:11:41 +0000 Subject: [PATCH] Fix: Unit test ProfileReportBackwardsCompatTest was failing the 500ms time window under system load, replaced to a 20% time window of the reported kernel execution time --- .../com/aparapi/runtime/ProfileReportBackwardsCompatTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/com/aparapi/runtime/ProfileReportBackwardsCompatTest.java b/src/test/java/com/aparapi/runtime/ProfileReportBackwardsCompatTest.java index f42352ec..2c2e0835 100644 --- a/src/test/java/com/aparapi/runtime/ProfileReportBackwardsCompatTest.java +++ b/src/test/java/com/aparapi/runtime/ProfileReportBackwardsCompatTest.java @@ -146,7 +146,7 @@ public class ProfileReportBackwardsCompatTest { assertEquals("Aparapi Accumulated execution time doesn't match", accumulatedExecutionTime, kernel.getAccumulatedExecutionTime(), 1e-10); assertEquals("Aparapi last execution time doesn't match last report", lastExecutionTime, report.getExecutionTime(), 1e-10); assertEquals("Aparapi last conversion time doesn't match last report", lastConversionTime, report.getConversionTime(), 1e-10); - assertEquals("Test estimated accumulated time doesn't match within 500ms window", runTime, accumulatedExecutionTime, 500); + assertEquals("Test estimated accumulated time doesn't match within 20% time window", runTime, accumulatedExecutionTime, 0.2f*runTime); assertTrue(validateBasic1Kernel(inputArray, outputArray)); } finally { kernel.registerProfileReportObserver(null); -- GitLab