Aleksey_WMDE added a comment.
Patch is merged - should be fixed.
I think we should wait, lets say, for a week and if nothing pops up close the ticket.TASK DETAILhttps://phabricator.wikimedia.org/T201453EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To:
gerritbot added a comment.
Change 451298 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Fix SimpleCacheWithBagOStuff test flackiness
https://gerrit.wikimedia.org/r/451298TASK DETAILhttps://phabricator.wikimedia.org/T201453EMAIL
gerritbot added a comment.
Change 451298 had a related patch set uploaded (by Aleksey Bekh-Ivanov (WMDE); owner: Aleksey Bekh-Ivanov (WMDE)):
[mediawiki/extensions/Wikibase@master] Fix SimpleCacheWithBagOStuff test flackiness
https://gerrit.wikimedia.org/r/451298TASK
Aleksey_WMDE added a comment.
Both solutions don't work for test when 0 is given as TTL. Special case is needed.TASK DETAILhttps://phabricator.wikimedia.org/T201453EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: Aleksey_WMDECc: Addshore, WMDE-leszek,
Aleksey_WMDE added a comment.
Solution 2:
Add 1 to the result of time() and $date->getTimestamp(). In this case effective TTL will always be up to 1 second greater than the given one. In production it will not matter; Tests already sleep for 2 seconds when TTL is 1 second, which is always
Aleksey_WMDE added a comment.
The failure happened in code where we store a value with TTL 1s and next line try to get it back. The value was considered expired, so null was returned.
The failure, probably, happened because we use time() and $date->getTimestamp() which return integer values. So