PHPUnit process is blocked when there's a lot of output and a test with separate process#6003
PHPUnit process is blocked when there's a lot of output and a test with separate process#6003staabm wants to merge 2 commits intosebastianbergmann:10.5from
Conversation
| --SKIPIF-- | ||
| <?php | ||
| for ($i = 0; $i < 390; $i++) { | ||
| \trigger_error("error {$i}"); |
There was a problem hiding this comment.
Are all the inis needed? Isn't standard long fwrite to stderr/stdout enough?
There was a problem hiding this comment.
if you want to assist in fixing this problem, you could try to reduce the reproducer to a very minimum.
we suppose the problem is a underlying php-src bug and having a reproducer small enough to report to the php-src project would be valuable - so at best getting something which no longer depends on PHPUnit.
There was a problem hiding this comment.
Is the main or the child blocked?
If the main (reading) process, then output to long stdout/stderr must be enough.
If the child process, then I do not understand the problem.
There was a problem hiding this comment.
I think 3 processes are involved. Needs further investigation
phpunit main -> PHPT --TEST-- isolation -> process isolation (because of the attribute)
|
|
||
| (new PHPUnit\TextUI\Application)->run($_SERVER['argv']); | ||
| --EXPECTF-- | ||
| %A |
There was a problem hiding this comment.
I would expect the exact exception asserted here.
| } | ||
| } | ||
|
|
||
| if (empty($pipes)) { |
There was a problem hiding this comment.
| if (empty($pipes)) { | |
| if ($pipes === []) { |
| } | ||
| } | ||
|
|
||
| if (!$pipeOffset) { |
There was a problem hiding this comment.
| if (!$pipeOffset) { | |
| if ($pipeOffset === 0) { |
| fclose($pipes[1]); | ||
| } | ||
| while (true) { | ||
| $r = $pipes; |
There was a problem hiding this comment.
| $r = $pipes; | |
| $readPipes = $pipes; |
closes #5993