This is an automated email from the ASF dual-hosted git repository.

shuber pushed a commit to branch UNOMI-552
in repository https://gitbox.apache.org/repos/asf/unomi.git


The following commit(s) were added to refs/heads/UNOMI-552 by this push:
     new 6193b1f  UNOMI-552 Fix failing integration tests - Add comment to 
explain why we are using a <1 ratio for test validation
6193b1f is described below

commit 6193b1f10adb5fe9e845bf9d2d4ea29e4a5239db
Author: Serge Huber <[email protected]>
AuthorDate: Sun Feb 20 12:40:58 2022 +0100

    UNOMI-552 Fix failing integration tests
    - Add comment to explain why we are using a <1 ratio for test validation
---
 itests/src/test/java/org/apache/unomi/itests/RuleServiceIT.java | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/itests/src/test/java/org/apache/unomi/itests/RuleServiceIT.java 
b/itests/src/test/java/org/apache/unomi/itests/RuleServiceIT.java
index 88d0865..2943d07 100644
--- a/itests/src/test/java/org/apache/unomi/itests/RuleServiceIT.java
+++ b/itests/src/test/java/org/apache/unomi/itests/RuleServiceIT.java
@@ -153,6 +153,8 @@ public class RuleServiceIT extends BaseIT {
 
         double improvementRatio = ((double) unoptimizedRunTime) / ((double) 
optimizedRunTime);
         LOGGER.info("Unoptimized run time = {}ms, optimized run time = {}ms. 
Improvement={}x", unoptimizedRunTime, optimizedRunTime, improvementRatio);
+        // we check with a ratio of 0.9 because the test can sometimes fail 
due to the fact that the sample size is small and can be affected by
+        // environmental issues such as CPU or I/O load.
         assertTrue("Optimized run time should be smaller than unoptimized", 
improvementRatio > 0.9);
     }
 

Reply via email to