Skip to content

Commit

Permalink
[Process] Fix failing tests causing segfaults
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandre-daubois committed Feb 12, 2024
1 parent 7e2c857 commit 4fdf340
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Tests/ProcessTest.php
Expand Up @@ -1570,7 +1570,7 @@ public function testFailingProcessWithMultipleCallsToProcGetStatus()
*/
public function testLongRunningProcessWithMultipleCallsToProcGetStatus()
{
$process = $this->getProcess('php -r "sleep(1); echo \'done\';"');
$process = $this->getProcess('sleep 1 && echo "done" && php -r "exit(0);"');
$process->start(static function () use ($process) {
return $process->isRunning();
});
Expand All @@ -1585,7 +1585,7 @@ public function testLongRunningProcessWithMultipleCallsToProcGetStatus()
*/
public function testLongRunningProcessWithMultipleCallsToProcGetStatusError()
{
$process = $this->getProcess('php -r "sleep(1); echo \'failure\'; exit(123);"');
$process = $this->getProcess('sleep 1 && echo "failure" && php -r "exit(123);"');
$process->start(static function () use ($process) {
return $process->isRunning();
});
Expand Down

0 comments on commit 4fdf340

Please sign in to comment.