mikeerickson / phpunit-pretty-result-printer

PHPUnit Pretty Result Printer -- make your PHPUnit tests look pretty!
MIT License
1.2k stars 71 forks source link

Timeout when running test that generates coverage #119

Closed dingo-d closed 6 years ago

dingo-d commented 6 years ago

I have an issue when running unit tests that generate code coverage, and this started to happen after I added this package.

I get the following message

[Symfony\Component\Process\Exception\ProcessTimedOutException] The process "'/usr/local/Cellar/php/7.2.4_1/bin/php' -d allow_url_fopen='1' -d disable_functions='' -d memory_limit='1536M' vendor/bin/phpunit -c phpunit-unit.xml.dist" exce eded the timeout of 300 seconds.

The unit test that I run without code coverage passes, and I get the nice checkmarks and all, but the one with code coverage fails like this.

Is there a flag I can use not to use the pretty printer when generating test coverage?

EDIT: I increased the memory limit to 2048M and I still get this issue.

dingo-d commented 6 years ago

Ok, I think I found out where the issue lies - I'm running PHPUnit via composer script, and I needed to add "process-timeout": 600 to my config value in the composer.json

mikeerickson commented 6 years ago

@dingo-d glad you got it figured out. Seemed out of range for this extension, but good to know nonetheless

dingo-d commented 6 years ago

Yeah, also if anybody has an issue with colors not working in the composer scripts, you need to add --colors=always in the scripts.

🙂

mikeerickson commented 6 years ago

That is a PHPUnit setting, we just use the default. FWIW you can also set these items in the phpunit.xml file

dingo-d commented 6 years ago

I had them in the phpunit.xml.dist, but when running the composer script the colors didn't work for some reason 🤷‍♂️