8000 [Stopwatch] Fix tests on Travis (also vagrant) by brikou · Pull Request #9276 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Stopwatch] Fix tests on Travis (also vagrant) #9276

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

Closed
wants to merge 1 commit into from

Conversation

brikou
Copy link
Contributor
@brikou brikou commented Oct 11, 2013

@fabpot
Copy link
Member
fabpot commented Oct 11, 2013

But that makes the whole test suite run much slower.

@brikou
Copy link
Contributor Author
brikou commented Oct 11, 2013

Yes it now takes 1.4s on my vagrant box, but when running 100 times it fails only 4 times.

for i in {1..100}; do
    echo "Test #${i}"
    phpunit
done

I'll give you my stats without the patch...

@brikou
Copy link
Contributor Author
brikou commented Oct 11, 2013

Without the patch, tests failed 89 times out of 100 on my vagrant box, with this patch only 4 times, and it just takes 1 more second.

@lsmith77
Copy link
Contributor

do we currently already group slow tests? if not then maybe it might be good todo this.

alternatively .. we could make a sleep time multiplier configurable, we have done something similar for some basic performance tests in the PHPCR/CouchDB ODM test suites:
https://github.com/doctrine/phpcr-odm/blob/master/tests/phpunit_jackrabbit.xml.dist#L11

9BDB

fabpot added a commit that referenced this pull request Oct 15, 2013
This PR was submitted for the master branch but it was merged into the 2.2 branch instead (closes #9276).

Discussion
----------

[Stopwatch] Fix tests on Travis (also vagrant)

Travis often fails to run tests related to the Stopwatch Component, check it yourself:

- https://travis-ci.org/symfony/symfony/jobs/12340378
- https://travis-ci.org/symfony/symfony/jobs/12365787
- https://travis-ci.org/symfony/symfony/jobs/12365790
- https://travis-ci.org/symfony/symfony/jobs/12367771
- https://travis-ci.org/symfony/symfony/jobs/12367844
- https://travis-ci.org/symfony/symfony/jobs/12368619
- https://travis-ci.org/symfony/symfony/jobs/12371316
- https://travis-ci.org/symfony/symfony/jobs/12375730

This is because Travis is just slow as hell. So I just multiply the used usleep by 10.

Commits
-------

bf65483 Make usleep longer and simplify assertions
@fabpot fabpot closed this Oct 15, 2013
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
0