-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Symfony\Component\Stopwatch\Tests\StopwatchEventTest::testEnsureStopped is volatile #14444
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
Comments
I cannot see any error in that job, here yes https://travis-ci.org/symfony/symfony/jobs/59554714.
we can increase the delta in |
@dosten a volatile test means it fails randomly (depending on the load of the Travis servers for instance) |
@stof yes, i know. I'm saying that the failing assertions have a 4th parameter named $delta. Ex: public function testEnsureStopped()
{
// this also test overlap between two periods
$event = new StopwatchEvent(microtime(true) * 1000);
$event->start();
usleep(100000);
$event->start();
usleep(100000);
$event->ensureStopped();
$this->assertEquals(300, $event->getDuration(), null, self::DELTA); // delta = 37
} In the example, phpunit assert as equals values between [263, 337]. |
@dosten if we increase the delta too much, the test will be totally useless. So updating blindly the delta until we never see failures anymore is not the solution either. In the end, we would not detect real bugs in the logic anymore if we allow too much |
Same problem here |
@stof considering both fixes have been merged i assume this ticket can be closed? |
@marcojanssen the first ticket is not relevant to this one (it just mentions that the build in that PR is failing because of the volatile test in this issue). The second ticket was rejected, as it was not testing the method. Tl;dr: Nothing has been fixed around this afaics. |
Closing as there is no point in keeping those tickets around. We either fix the problem or we don't care about them, we don't need reminders. |
See https://travis-ci.org/symfony/symfony/jobs/59546578
The text was updated successfully, but these errors were encountered: