Page MenuHomePhabricator

Flaky test WANObjectCacheTest::testPreemptiveRefresh (at least under php8.2 and php8.3)
Open, Needs TriagePublic

Description

It seems the following test can fail under php8.2+, but also passed the most time, it seems the chance to get flaky is higher in modern php

https://integration.wikimedia.org/ci/job/quibble-vendor-mysql-php82-noselenium-docker/146/console

1) WANObjectCacheTest::testPreemptiveRefresh
Value cached
Failed asserting that 2 is identical to 1.

/workspace/src/tests/phpunit/unit/includes/libs/objectcache/WANObjectCacheTest.php:658
/workspace/src/tests/phpunit/MediaWikiUnitTestCase.php:127

Passed under https://integration.wikimedia.org/ci/job/quibble-vendor-mysql-php82-noselenium-docker/126/console

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

There is a mt_rand in WANObjectCache::worthRefreshExpiring and with php8.2 there is a new/refactored random extension.
I have seen this flaky test only on php8.2+, so this could be an issue that something change and now the random makes problems on CI.

php8.2 is now voting on core, if there are to many fails the test can be skipped by until the issue is investigated.

WANObjectCacheTest.php
	public function testPreemptiveRefresh() {
		$this->markTestSkippedIfPhp( '>=', '8.2' );

Change 983258 had a related patch set uploaded (by Jforrester; author: Jforrester):

[mediawiki/core@master] WANObjectCacheTest::testPreemptiveRefresh: Skip flaky test for PHP 8.2+

https://gerrit.wikimedia.org/r/983258

Change 983258 merged by jenkins-bot:

[mediawiki/core@master] WANObjectCacheTest::testPreemptiveRefresh: Skip flaky test for PHP 8.2+

https://gerrit.wikimedia.org/r/983258

Change #1017397 had a related patch set uploaded (by Reedy; author: Jforrester):

[mediawiki/core@REL1_41] WANObjectCacheTest::testPreemptiveRefresh: Skip flaky test for PHP 8.2+

https://gerrit.wikimedia.org/r/1017397

Change #1017397 merged by jenkins-bot:

[mediawiki/core@REL1_41] WANObjectCacheTest::testPreemptiveRefresh: Skip flaky test for PHP 8.2+

https://gerrit.wikimedia.org/r/1017397