Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanFreeman committed Jun 8, 2024
1 parent c091e3e commit a9ff704
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions tests/swoole_runtime/file_hook/bug_4327.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@ Swoole\Runtime::enableCoroutine($flags = SWOOLE_HOOK_ALL);

function createDirectories($protocol = "")
{
if (defined('SWOOLE_THREAD')) {
echo "SUCCESS".PHP_EOL;
return;
}

$barrier = Barrier::make();
$first = "$protocol/".rand(0, 1000);
$second = "/".rand(0, 1000);
Expand Down Expand Up @@ -49,9 +44,14 @@ run(function () {
createDirectories("file://");
});

Swoole\Runtime::enableCoroutine(false);
createDirectories();
createDirectories("file://");
if (defined('SWOOLE_THREAD')) {
echo "SUCCESS".PHP_EOL;
} else {
Swoole\Runtime::enableCoroutine(false);
createDirectories();
createDirectories("file://");
}

?>
--EXPECT--
SUCCESS
Expand Down

0 comments on commit a9ff704

Please sign in to comment.