Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Fix tests #3438

Merged
merged 3 commits into from Feb 24, 2012

Conversation

Projects
None yet
3 participants
Member

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.
Owner

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

merged branch Seldaek/fixtests (PR #3438)
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

@Tobion Tobion commented on the diff Feb 24, 2012

...sts/Component/HttpKernel/Debug/StopwatchEventTest.php
$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)');
@Tobion

Tobion Feb 24, 2012

Member

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.

@Seldaek

Seldaek Feb 24, 2012

Member

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

merged branch Seldaek/fixtests (PR #3443)
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