From 580cf37086281d404b7a17d62f5c762e641fed38 Mon Sep 17 00:00:00 2001 From: twosee Date: Mon, 24 Sep 2018 22:33:08 +0800 Subject: [PATCH] Swoole 4 Compatibility. --- tests/phpunit | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tests/phpunit b/tests/phpunit index 4a059ad..c1ab953 100644 --- a/tests/phpunit +++ b/tests/phpunit @@ -64,8 +64,11 @@ require PHPUNIT_COMPOSER_INSTALL; $server_list = require __DIR__ . '/servers/manager.php'; go(function () { - // run tests - PHPUnit\TextUI\Command::main(); - // exit event loop (useless?) - swoole_event_exit(); + try{ + // run tests + PHPUnit\TextUI\Command::main(); + } + catch (\Swoole\ExitException $e) { + return; + } });