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:
Russell Smith
2016-09-14 09:49:30 +10:00
parent 0344082208
commit 74ee9d29d2
7 changed files with 23 additions and 10 deletions
+1 -1
View File
@@ -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);