Commit 71a9efdd by Carsten Brandt

changed cache test to wait more than expirytime

change is to avoid random test failure on race condition. fixes #203 #231
parent 9c2eb4df
...@@ -110,7 +110,8 @@ abstract class CacheTest extends TestCase ...@@ -110,7 +110,8 @@ abstract class CacheTest extends TestCase
$this->assertTrue($cache->set('expire_test', 'expire_test', 2)); $this->assertTrue($cache->set('expire_test', 'expire_test', 2));
sleep(1); sleep(1);
$this->assertEquals('expire_test', $cache->get('expire_test')); $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')); $this->assertFalse($cache->get('expire_test'));
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment