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

[Stopwatch] Different behaviour if grouped with other tests #16405

Closed
EmanueleMinotto opened this issue Oct 31, 2015 · 15 comments
Closed

[Stopwatch] Different behaviour if grouped with other tests #16405

EmanueleMinotto opened this issue Oct 31, 2015 · 15 comments

Comments

@EmanueleMinotto
Copy link

I don't know if this is related to #14444 or not, but everytime I try locally the tests (branch 2.8) related to the Stopwatch I have this behaviour:

2015-10-30 - 23:57:32

@TomasVotruba
Copy link
Contributor

Oh, came across that yesterday too (3.0). Took me while to figure out it requires standalone run.

I'd be for make these test independent on outer timings.

Shall I prepare PR?

@TomasVotruba
Copy link
Contributor

@jakzal
Copy link
Contributor

jakzal commented Nov 3, 2015

@TomasVotruba great job! Are you working on a PR?

@TomasVotruba
Copy link
Contributor

@jakzal I would love to, but I'm not exactly sure, why it's nulled. Got any idea?

I'll try checking tonight.

@jakzal
Copy link
Contributor

jakzal commented Nov 3, 2015

@TomasVotruba I didn't look into this yet as I wouldn't like to duplicate your efforts :)

@TomasVotruba
Copy link
Contributor

It looks like it's passing with:

phpupnit (my local phar file or vendor native PHPUnit binary)

but not with the custom script:

php phpunit.

@TomasVotruba
Copy link
Contributor

It looks like it's not passing with the custom script:

php phpunit.

but my local phar file or vendor native PHPUnit binary:

phpupnit


Minimal changed phpunit.xml setup to reproduce the issue:

<testsuites>
    <testsuite name="Symfony Test Suite">
        <directory>./src/Symfony/Component/HttpKernel/Tests/Debug/</directory>
        <directory>./src/Symfony/Component/Stopwatch/*</directory>
    </testsuite>
</testsuites>

My PHP version is 5.6.

screenshot from 2015-11-06 15 36 20

@TomasVotruba
Copy link
Contributor

I've tried to delete /.phpunit directory and rerun the Symfony phpunit script and all passes well now.

Could you retry @EmanueleMinotto ?

@EmanueleMinotto
Copy link
Author

@TomasVotruba sorry for the delay.

Changing the testsuite (in the phpunit.xml.dist) to:

    <testsuites>
        <testsuite name="Symfony Test Suite">
            <directory>./src/Symfony/Component/HttpKernel/Tests/Debug/</directory>
            <directory>./src/Symfony/Component/Stopwatch/*</directory>
        </testsuite>
    </testsuites>

I have all green tests on every tests execution (also after just the git clone and composer install).

schermata 2015-11-10 alle 09 45 07

@nicolas-grekas
Copy link
Member

@EmanueleMinotto did you delete the .phpunit folder the test using ./phpunit again?

@EmanueleMinotto
Copy link
Author

@nicolas-grekas yes, also removing the .phpunit directory it works (always with the last testsuite I wrote above).

@nicolas-grekas
Copy link
Member

So, is there still an issue? You had a legacy .phpunit installation and the issue has gone now isn't it?

@TomasVotruba
Copy link
Contributor

For me it's gone.

@EmanueleMinotto
Copy link
Author

yes, it's solved for me too, thank you

@nicolas-grekas
Copy link
Member

cool

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

4 participants