paratestphp / paratest

:computer: Parallel testing for PHPUnit
MIT License
2.31k stars 228 forks source link

After upgrading our app to Laravel 10 + php 8.2, I keep getting "Test was run in child process and ended unexpectedly" with parallel testing on github #845

Closed prototorpedo closed 4 months ago

prototorpedo commented 7 months ago
Q A
ParaTest version 7.4.3
PHPUnit version 10.5.13
PHP version 8.2.14

Summary

Parallel testing does not work on github anymore after upgrading to above stack. A bunch of the tests error out "Test was run in child process and ended unexpectedly" even though all of them pass locally. This was working fine before the upgrade. I don't have any idea why this happens either... I tried different versions of everything, different phpunit and paratest configs and nothing seems to work.

Slamdunk commented 7 months ago

Hello, I'd need the full error text to help you better, but I would like to highlight that we are not maintaining the parallel plugin for Laravel directly.

prototorpedo commented 7 months ago

Well there's really not much to share in regards to this. Basically some of the tests fail with error message like so:

FAILED Tests\Http\Middleware\SetUniversTest > it r… AssertionFailedError
Test was run in child process and ended unexpectedly

No further details. It used to be exactly half the tests were failing which led us to think it was something with the second process not being handled correctly, but now I see the number of failing tests is random.

These are tests that pass locally both with parallel option and without (with processIsolation = true). Interestingly, the tests don't go through with processIsolation turned off, unless we run them "manually" with the phpunit command.

raf-lv commented 6 months ago

I'm facing a similar problem, but very random and hard to reproduce. I'm running Pest in parallel mode which uses paratest. Sometimes it just crashes. Had to reduce the number of parallel testing to 4 threads and that worked for a long time, but recently it reappeared.

github-actions[bot] commented 4 months ago

This issue has gone two months without activity. In another two weeks, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you label it Backlog or In Progress, I will leave it alone ... forever!