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

Infection: raise timeout for mutants from 10 to 60 seconds #1331

Open
wants to merge 1 commit into
base: 6.8.x
Choose a base branch
from

Conversation

Slamdunk
Copy link

The current 10 seconds timeout hides mutants that in reality are escaping if we raise it to just 60 seconds:

3676 mutations were generated:
    3607 mutants were killed
       0 mutants were configured to be ignored
       3 mutants were not covered by tests
      38 covered mutants were not detected
      14 errors were encountered
       0 syntax errors were encountered
      14 time outs were encountered
       0 mutants required more time than configured

Metrics:
         Mutation Score Indicator (MSI): 98%
         Mutation Code Coverage: 99%
         Covered Code MSI: 98%

/cc @kukulich

@kukulich
Copy link
Collaborator

The mutation score is really like some neverending zombie TV serie :)

composer.json Outdated
"phpunit/phpunit": "10.0.5",
"phpstan/phpstan": "^1.9.17",
"phpstan/phpstan-phpunit": "^1.3.4",
"phpunit/phpunit": "^10.0.7",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I follow your reasoning, this patch should be red also on the pre-existing PHPUnit version?

Copy link
Author

@Slamdunk Slamdunk Feb 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, even in the last PHPUnit 9.6.3 build you had more than a thousand mutants escaped under the timeout carpet:

https://github.com/Roave/BetterReflection/actions/runs/4092019766/jobs/7056471771#step:5:117

3676 mutations were generated:
    2567 mutants were killed
       0 mutants were configured to be ignored
       0 mutants were not covered by tests
       0 covered mutants were not detected
       5 errors were encountered
       0 syntax errors were encountered
       3 time outs were encountered
    1101 mutants required more time than configured

@Slamdunk
Copy link
Author

Slamdunk commented Feb 13, 2023

Github Actions is freaking slow, 60 seconds are not enough for another 392 mutants, while on my i7-8700 even with 30 seconds no mutants time out:

https://github.com/Roave/BetterReflection/actions/runs/4161271803/jobs/7199509066#step:5:116

3676 mutations were generated:
    3242 mutants were killed
       0 mutants were configured to be ignored
       7 mutants were not covered by tests
      15 covered mutants were not detected
      11 errors were encountered
       0 syntax errors were encountered
       9 time outs were encountered
     392 mutants required more time than configured

I'll leave up to you to tweak it: if you raise it even higher you'll eventually get timed out mutants to zero, but the build could take almost 2 hours 🙄

@Ocramius
Copy link
Member

@Slamdunk thanks for investigating this meanwhile! 💪

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

Successfully merging this pull request may close these issues.

3 participants