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

Tests freeze while running when using code coverage report #1041

Open
max-paqt opened this issue Jul 11, 2024 · 3 comments
Open

Tests freeze while running when using code coverage report #1041

max-paqt opened this issue Jul 11, 2024 · 3 comments

Comments

@max-paqt
Copy link

Q A
php-code-coverage version 9.2.31
PHP version 8.2.21
Driver Xdebug
Xdebug version (if used) 3.3.2
Installation Method Composer
Usage Method PHPUnit
PHPUnit version (if used) 9.6.18

When running our test suite phpunit consistently freezes after running ~1500 of the ~2000 tests.

When running with -vvv the only output indicates the last (before freezing) test started, and nothing else.

I tried a few different versions of phpunit, but it didn't improve things.

Running the suite while having code coverage disabled, this issue does not occur.

How could we debug this issue?

@sebastianbergmann
Copy link
Owner

When running with -vvv the only output indicates the last (before freezing) test started, and nothing else.

PHPUnit's test runner does not have a -vvv CLI option. And the --version / -v CLI options it does have do not have the effect you describe. Are you using an extension for / wrapper around PHPUnit's test runner? If that is the case, then my first advice would be to disable that.

Please note that Bugfix Support for PHPUnit 9 has ended and the only work I still do on this version is to keep it compatible with new versions of PHP (Life Support).

How could we debug this issue?

Off the top of my head, I do not know how to debug this.

@max-paqt
Copy link
Author

max-paqt commented Jul 11, 2024

PHPUnit's test runner does not have a -vvv CLI option. And the --version / -v CLI options it does have do not have the effect you describe.

My bad, I was using -v, -vvv & --debug mixed together to see if I could get any more debug info. But whichever flag it was, it did not provide much info anyway so not too relevant I'd say.

We do normally use a wrapper, but disabled that to confirm whether it was an issue in the wrapper, or lower down the chain.

Please note that Bugfix Support for PHPUnit 9 has ended and the only work I still do on this version is to keep it compatible with new versions of PHP (Life Support).

Tested this with phpunit v10 as well, which had the same issue for me.

In case it may be relevant, we only encountered the issue while running the tests in a Github runner, not while running it on our own machines inside a docker container.

@staabm
Copy link
Contributor

staabm commented Oct 21, 2024

Can you create a as-small-as-possible reproducer which you can share?

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

No branches or pull requests

3 participants