Skip to content

Commit 2f7a8f2

Browse files
committed
Fixed AsyncMilliSleepExceptionHandlerTest::testValue() failing when run as part of suite.
1 parent e2e1f78 commit 2f7a8f2

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

test/Unit/AsyncMilliSleepExceptionHandlerTest.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,13 @@ public function testValue()
1515
{
1616
$handler = new AsyncMilliSleepExceptionHandler(new \ArrayIterator([1000]));
1717

18-
$start = microtime(true);
19-
\Amp\Promise\wait($handler());
18+
\Amp\Loop::run(static function () use ($handler): \Generator {
19+
$start = microtime(true);
20+
21+
yield $handler();
2022

21-
self::assertGreaterThan($start + 1, microtime(true));
23+
self::assertGreaterThan($start + 1, microtime(true));
24+
});
2225
}
2326

2427
public function testSeries()

0 commit comments

Comments
 (0)