Skip to content

Commit

Permalink
Corrected tests
Browse files Browse the repository at this point in the history
  • Loading branch information
WyriHaximus committed Oct 30, 2017
1 parent 6e21a83 commit 41606c1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/AbstractLoopTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ public function testSignalsKeepTheLoopRunning()
$this->loop->stop();
});

$this->assertRunSlowerThan(1.4);
$this->assertRunSlowerThan(1.5);
}

public function testSignalsKeepTheLoopRunningAndRemovingItStopsTheLoop()
Expand All @@ -473,7 +473,7 @@ public function testSignalsKeepTheLoopRunningAndRemovingItStopsTheLoop()
$this->loop->removeSignal(SIGUSR1, $function);
});

$this->assertRunSlowerThan(3);
$this->assertRunFasterThan(1.6);
}

private function assertRunSlowerThan($minInterval)
Expand All @@ -485,7 +485,7 @@ private function assertRunSlowerThan($minInterval)
$end = microtime(true);
$interval = $end - $start;

$this->assertTrue($minInterval > $interval);
$this->assertLessThan($interval, $minInterval);
}

private function assertRunFasterThan($maxInterval)
Expand Down

0 comments on commit 41606c1

Please sign in to comment.