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

Remove large group (#1115) #1117

Closed

Conversation

theofidry
Copy link
Member

As far as I can see this group is not actually used and this test is run as part of e2e. @maks-rafalko can you confirm?

@maks-rafalko
Copy link
Member

in master:

vendor/bin/phpunit --group=e2e does *not**execute test_it_runs_on_itself test

So this PR is quite dangerous, this very large test will be executed with other e2e tests while previously it wasn't

We should ask @sanmai why it was added. Probably we don't need it?

@theofidry
Copy link
Member Author

When do we ever execute it then? I could not find any occurrence anywhere

public function test_it_runs_on_itself(): void
{
if (ini_get('memory_limit') === '-1') {
$this->markTestSkipped(implode("\n", [
'Refusing to run Infection on itself with no memory limit set: it is dangerous.',
'To run this test with a memory limit set please use:',
'php -dmemory_limit=128M vendor/bin/phpunit --group=large',
'php -dmemory_limit=128M vendor/bin/phpunit --group=e2e',
Copy link
Member

@sanmai sanmai Mar 5, 2020

Choose a reason for hiding this comment

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

When this was written, the entire test suite wasn't marked as e2e.
In any case this isn't the test you want to run every time.

@sanmai
Copy link
Member

sanmai commented Mar 5, 2020

The build is failing with:

Cannot open file ""--exclude-group=integration".php".

Issue #1119

*
* php -dmemory_limit=128M vendor/bin/phpunit --group=large
*
* @large
Copy link
Member

@sanmai sanmai Mar 5, 2020

Choose a reason for hiding this comment

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

I'd rather keep this designation. And explanation to its existence. It is really slow. I think even slower these days.

<exclude>
<group>large</group>
</exclude>
</groups>
Copy link
Member

@sanmai sanmai Mar 5, 2020

Choose a reason for hiding this comment

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

And so is best to ignore this group too, IMO.

@sanmai
Copy link
Member

sanmai commented Mar 5, 2020

About removing, this is a fine test, for example, to run when you want to find dead code.

As it is only few lines of code, I propose to keep it.

@sanmai sanmai mentioned this pull request Mar 5, 2020
@theofidry theofidry changed the title Make PHPUnit fail on warning or risky (#1115) Remove large group (#1115) Mar 5, 2020
@theofidry
Copy link
Member Author

Closing in favour of #1120

@theofidry theofidry closed this Mar 5, 2020
@theofidry theofidry deleted the refactor/remove-large-group branch March 5, 2020 08:41
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.

None yet

3 participants