mirror of
https://github.com/OPSnet/Gazelle.git
synced 2026-10-21 16:03:29 -04:00
sleep as little as possible in time-critical tests
This commit is contained in:
@@ -45,7 +45,7 @@ class UserMultiFactorAuthTest extends TestCase {
|
||||
$burn = array_pop($recovery);
|
||||
$this->assertFalse($mfa->burnRecovery('no such key'), 'utest-no-burn-mfa');
|
||||
$this->assertTrue($mfa->burnRecovery($burn), 'utest-burn-mfa');
|
||||
sleep(1); // pg table's time resolution is too low and causes race
|
||||
Helper::sleepTick(); // pg table's time resolution is too low and causes race
|
||||
$this->assertEquals(9, $this->countTokens(), 'utest-less-mfa');
|
||||
$this->assertFalse($mfa->burnRecovery($burn), 'utest-burn-twice-mfa');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user