From 549ffaf091caebef212324f7e0837c7d1eae3624 Mon Sep 17 00:00:00 2001
From: Julien Muchembled <jm@nexedi.com>
Date: Fri, 18 Feb 2011 10:49:40 +0000
Subject: [PATCH] Fix random failures of test_06_CheckCacheExpiration

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@43469 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5Type/tests/testCacheTool.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/product/ERP5Type/tests/testCacheTool.py b/product/ERP5Type/tests/testCacheTool.py
index 210d5cea4c..bf65beec8b 100644
--- a/product/ERP5Type/tests/testCacheTool.py
+++ b/product/ERP5Type/tests/testCacheTool.py
@@ -494,7 +494,8 @@ return 'a' * 1024 * 1024 * 25
       self.assertTrue(calculation_time < 1.0)
 
       # Wait expiration period then check that value is computed
-      time_left_to_wait = (self.cache_duration - calculation_time)
+      # .1 is an additional epsilon delay to work around time precision issues
+      time_left_to_wait = .1 + self.cache_duration
       print "\n\tSleep %.2f seconds to wait expiration time" % time_left_to_wait
       time.sleep(time_left_to_wait)
 
-- 
2.30.9