10000 Fix tests by Seldaek · Pull Request #3438 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Fix tests #3438

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

Merged
merged 3 commits into from
Feb 24, 2012
Merged

Fix tests #3438

merged 3 commits into from
Feb 24, 2012

Conversation

Seldaek
Copy link
Member
@Seldaek Seldaek commented Feb 23, 2012
  • Some windows fixes
  • Skip memcached for real when it's not there - by the way I think those tests are insane since they seem to run a purge() on the memcached server. If you run this by accident somewhere where it matters it could hurt. I think they should be put in a group disabled by default, I'll be happy to add that change if it's deemed useful.
  • Fixed the timer tests for good on windows (which seems to be quite bad at usleep). I also documented them so you actually know how it failed when it does, the false instead of true wasn't super useful.

@fabpot
Copy link
Member
fabpot commented Feb 24, 2012

+1 for putting the memcache tests in a group.

fabpot added a commit that referenced this pull request Feb 24, 2012
Commits
-------

e67f8d4 Properly skip memcached tests when no memcached server is present
005d86f Broaden timer tests limits
001c4fd Fix windows fs tests

Discussion
----------

Fix tests

- Some windows fixes
- Skip memcached for real when it's not there - by the way I think those tests are insane since they seem to run a purge() on the memcached server. If you run this by accident somewhere where it matters it could hurt. I think they should be put in a group disabled by default, I'll be happy to add that change if it's deemed useful.
- Fixed the timer tests for good on windows (which seems to be quite bad at `usleep`). I also documented them so you actually know how it failed when it does, the false instead of true wasn't super useful.
@fabpot fabpot merged commit e67f8d4 into symfony:master Feb 24, 2012
$event->stop();
$total = $event->getTotalTime();
$this->assertTrue($total >= 9 && $total <= 20);
$this->assertTrue($total > 10 && $total <= 29, $total.' should be 20 (between 10 and 29)');
Copy link
Contributor

Choose a reason for hiding this comment

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

Naming is inconsistent. Here is means higher than 10 (exclusive 10) and in line 104 is means inclusive 21.
Btw, these test still fail on my windows. I get higher values, e.g. 31.4.

Copy link
Member Author

Choose a reason for hiding this comment

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

Please send a PR if you really think this matters - sorry but I can't see this file anymore :) And yeah I'm sure it still will fail every now and then, but hopefully rarely enough that it is not too distracting when developing. The only solution would be to increase the sleeps so that small inaccuracies become less relevant, but that makes running the tests annoying too.

fabpot added a commit that referenced this pull request Feb 27, 2012
Commits
-------

d95d63d Ignore destructive memcached tests by default

Discussion
----------

Ignore destructive memcached tests by default

Follow up for #3438
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