Skip to content
Snippets Groups Projects
Commit 65a24c2f authored by Christian Kuhn's avatar Christian Kuhn
Browse files

[BUGFIX] Stabilize flaky TimeTracker unit test

The time tracker sometimes switches between two milliseconds
in its operation. Test a bit weaker to cope with that.

Change-Id: I20d58296749bf33b12ab2da72691ecf4853842eb
Resolves: #82635
Releases: master, 8.7
Reviewed-on: https://review.typo3.org/54260


Tested-by: default avatarTYPO3com <no-reply@typo3.com>
Reviewed-by: default avatarBenni Mack <benni@typo3.org>
Tested-by: default avatarBenni Mack <benni@typo3.org>
Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
parent 7df7dee3
No related merge requests found
......@@ -26,7 +26,7 @@ class TimeTrackerTest extends UnitTestCase
/**
* @test
*/
public function getParseTimeReturnsZeroIfNoValuesAreSet()
public function getParseTimeReturnsZeroOrOneIfNoValuesAreSet()
{
unset(
$GLOBALS['TYPO3_MISC']['microtime_end'],
......@@ -35,7 +35,7 @@ class TimeTrackerTest extends UnitTestCase
$GLOBALS['TYPO3_MISC']['microtime_BE_USER_end']
);
$parseTime = (new TimeTracker())->getParseTime();
self::assertSame(0, $parseTime);
self::assertLessThanOrEqual(1, $parseTime);
}
/**
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment