Fix random test failure on lock

This commit is contained in:
Jérémy Derussé 2018-12-30 15:22:53 +01:00
parent f82beb51de
commit 8cff565947
No known key found for this signature in database
GPG Key ID: 2083FA5758C473D2

View File

@ -45,10 +45,10 @@ trait ExpiringStoreTestTrait
$store = $this->getStore();
$store->save($key);
$store->putOffExpiration($key, $clockDelay / 1000000);
$store->putOffExpiration($key, 2 * $clockDelay / 1000000);
$this->assertTrue($store->exists($key));
usleep(2 * $clockDelay);
usleep(3 * $clockDelay);
$this->assertFalse($store->exists($key));
}
@ -85,10 +85,10 @@ trait ExpiringStoreTestTrait
$store = $this->getStore();
$store->save($key);
$store->putOffExpiration($key, $clockDelay / 1000000);
$store->putOffExpiration($key, 2 * $clockDelay / 1000000);
$this->assertTrue($store->exists($key));
usleep(2 * $clockDelay);
usleep(3 * $clockDelay);
$this->assertFalse($store->exists($key));
}