MDL-55944 testing: Reduce sleep usage.
Remove sleep() and replace with waiting for a second to roll over, this results in a simpler call the guarantee time() has moved forward
This commit is contained in:
@@ -358,7 +358,7 @@ class core_phpunit_advanced_testcase extends advanced_testcase {
|
||||
|
||||
$this->setCurrentTimeStart();
|
||||
$this->assertTimeCurrent(time());
|
||||
sleep(2);
|
||||
$this->waitForSecond();
|
||||
$this->assertTimeCurrent(time());
|
||||
$this->assertTimeCurrent(time()-1);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user