Skip to content

Commit 917a8b6

Browse files
authored
Optimized Hyperf\Coordinator\Timer::tick() to run the callback inside Hyperf\Coroutine\wait() so it executes in a properly managed coroutine context. (#7761)
1 parent 75dc7fa commit 917a8b6

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

tests/Stub/ContainerStub.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
use Hyperf\Context\ApplicationContext;
1717
use Hyperf\Contract\ConfigInterface;
1818
use Hyperf\Contract\StdoutLoggerInterface;
19+
use Hyperf\Coroutine\Waiter;
1920
use Mockery;
2021
use Mockery\MockInterface;
2122
use Psr\Container\ContainerInterface;
@@ -46,6 +47,7 @@ public static function getContainer(string $driver): ContainerInterface|MockInte
4647
$logger->shouldReceive('log')->andReturn(null);
4748
return $logger;
4849
});
50+
$container->shouldReceive('has')->with(Waiter::class)->andReturnFalse();
4951
return $container;
5052
}
5153
}

0 commit comments

Comments
 (0)