Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: tests with --parallel flag fails starting from PEST 2.29.1 #1053

Closed
eleftrik opened this issue Jan 3, 2024 · 10 comments
Closed

[Bug]: tests with --parallel flag fails starting from PEST 2.29.1 #1053

eleftrik opened this issue Jan 3, 2024 · 10 comments
Labels

Comments

@eleftrik
Copy link

eleftrik commented Jan 3, 2024

What Happened

I have a Laravel 10.39.0 application with ~1000 tests.
Until PEST 2.29.0, everything runs smoothly: tests are always passing.

Starting from PEST 2.29.1 (even with 2.30.0 version), I got a strange behavior:

  • tests are passing when running without --parallel flag
  • tests are NOT passing when running with --parallel flag and I got this error:
In WorkerCrashedException.php line 41:

  The test "PARATEST='1' TEST_TOKEN='4' UNIQUE_TEST_TOKEN='4_6595627841337' /Users/..../myproject/tests/Feature/SomeFolder/SomeTest.php" failed.

  Exit Code: 0(OK)

  Working directory: /Users/....../myproject

  Output:
  ================


  Error Output:
  ================

(no other details are provided)

If I mark every test inside SomeTest.php file with ->todo();, such an error still occurs.
If I delete SomeTest.php, such an error still occurs, on the next test file inside SomeFolder.

For the moment, I've fixed version 2.29.0 in my composer.json to bypass the error.

Please let me know if I can provide you with other details.
Thank you

How to Reproduce

XDEBUG_MODE=off ./vendor/bin/pest --parallel --bail --colors=always to run the whole suite

Sample Repository

No response

Pest Version

2.29.1

PHP Version

8.2.14

Operation System

macOS

Notes

No response

@eleftrik eleftrik added the bug label Jan 3, 2024
@Rydgel
Copy link

Rydgel commented Jan 11, 2024

I have the same problem.
With the same PHP version as well.
Same behaviors, the tests in itself runs fine, and if I remove the test suite where this error occurs, it moves to the next file.

@eleftrik
Copy link
Author

@Rydgel Did you try to downgrade PEST to 2.29.0 version? Up now, this is the only temporary fix I have been able to find.

@Rydgel
Copy link

Rydgel commented Jan 11, 2024

@eleftrik I did downgrade and it fixed my issue 👍

@eleftrik
Copy link
Author

@Rydgel I'm glad it worked.

I would like to understand why this error is happening, but I'm missing some debugging skills related to PHPUnit / PEST.
Is there anyone who can help me? Thanks.

@Rydgel
Copy link

Rydgel commented Jan 11, 2024

It seems related to PHPUnit update

v2.29.0...v2.29.1

@calebdw
Copy link
Contributor

calebdw commented Jan 11, 2024

This has happened to me as well but only with xdebug enabled, no failures happen when removing the zend_extension=xdebug.so from the ini files

Edit: the exit code I am getting is 137 and could be due to an OOM error instead of the same issue the OP is experiencing

@eleftrik
Copy link
Author

Currently, I'm using Pest 2.32.2 and this error has disappeared.

@devajmeireles
Copy link
Member

Thanks for your feedback, @eleftrik !

Make sure to upgrade your PestPHP to the latest version to fix this issue.

@Rydgel
Copy link

Rydgel commented Jan 29, 2024

@eleftrik it was fixed by sebastianbergmann/phpunit#5662

@eleftrik
Copy link
Author

@eleftrik it was fixed by sebastianbergmann/phpunit#5662

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants