mirror of
https://gitee.com/hyperf/hyperf.git
synced 2024-12-02 03:37:44 +08:00
Fixed bug.
This commit is contained in:
parent
68d0b44248
commit
9b265b2b59
@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
\Swoole\Coroutine::create(function () {
|
||||
\Swoole\Coroutine\Run(function () {
|
||||
if (version_compare('7.1.0', PHP_VERSION, '>')) {
|
||||
fwrite(
|
||||
STDERR,
|
||||
@ -51,9 +51,8 @@
|
||||
require PHPUNIT_COMPOSER_INSTALL;
|
||||
|
||||
$code = PHPUnit\TextUI\Command::main(false);
|
||||
|
||||
if ($code > 0) {
|
||||
exit($code);
|
||||
}
|
||||
|
||||
swoole_event_exit();
|
||||
});
|
||||
|
@ -65,6 +65,10 @@ class ConcurrentTest extends TestCase
|
||||
|
||||
$this->assertSame(5, $count);
|
||||
$this->assertSame(10, $con->getRunningCoroutineCount());
|
||||
|
||||
while (! $con->isEmpty()) {
|
||||
Coroutine::sleep(0.1);
|
||||
}
|
||||
}
|
||||
|
||||
protected function getContainer()
|
||||
|
Loading…
Reference in New Issue
Block a user