Skip to content

Commit

Permalink
refactor(LoopIsolation) better output
Browse files Browse the repository at this point in the history
refactor(LoopIsolation) better output
  • Loading branch information
lucatume committed Jul 31, 2024
1 parent 4c7adda commit f3dc678
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions tests/_support/Traits/LoopIsolation.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,13 @@ protected function assertInIsolation(
}

if ($result->getExitCode() !== 0) {
codecept_debug('STDOUT: ' . $result->getStdoutBuffer());
codecept_debug('STDERR: ' . $result->getStderrBuffer());
$this->fail('Loop execution failed with exit code ' . $result->getExitCode());
$failureMessage = sprintf(
"\nEXIT CODE: %s\n\nSTDOUT---\n%s\n\nSTDERR---\n%s\n",
$result->getExitCode(),
$result->getStdoutBuffer(),
$result->getStderrBuffer()
);
$this->fail($failureMessage);
}

return $returnValue;
Expand Down

0 comments on commit f3dc678

Please sign in to comment.