From 71a9efdd554a3f23e0848b7a82e4ef355ccbac46 Mon Sep 17 00:00:00 2001 From: Carsten Brandt Date: Sat, 11 May 2013 13:33:05 +0200 Subject: [PATCH] changed cache test to wait more than expirytime change is to avoid random test failure on race condition. fixes #203 #231 --- tests/unit/framework/caching/CacheTest.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/unit/framework/caching/CacheTest.php b/tests/unit/framework/caching/CacheTest.php index 6a9632c..c524956 100644 --- a/tests/unit/framework/caching/CacheTest.php +++ b/tests/unit/framework/caching/CacheTest.php @@ -110,7 +110,8 @@ abstract class CacheTest extends TestCase $this->assertTrue($cache->set('expire_test', 'expire_test', 2)); sleep(1); $this->assertEquals('expire_test', $cache->get('expire_test')); - sleep(2); + // wait a bit more than 2 sec to avoid random test failure + usleep(2500000); $this->assertFalse($cache->get('expire_test')); }