mirror of
https://github.com/danog/amp.git
synced 2024-11-30 04:29:08 +01:00
Fix DriverTest::testBug163ConsecutiveDelayed to use assigned driver
This commit is contained in:
parent
a247757535
commit
bd428ca31b
@ -1487,7 +1487,8 @@ abstract class DriverTest extends TestCase {
|
||||
|
||||
public function testBug163ConsecutiveDelayed() {
|
||||
$emits = 3;
|
||||
Loop::run(function () use (&$time, $emits) {
|
||||
|
||||
$this->loop->defer(function () use (&$time, $emits) {
|
||||
$time = microtime(true);
|
||||
for ($i = 0; $i < $emits; ++$i) {
|
||||
yield new Delayed(100);
|
||||
@ -1495,6 +1496,8 @@ abstract class DriverTest extends TestCase {
|
||||
$time = microtime(true) - $time;
|
||||
});
|
||||
|
||||
$this->loop->run();
|
||||
|
||||
$this->assertGreaterThan(100 * $emits - 1 /* 1ms grace period */, $time * 1000);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user