Page MenuHomePhabricator

MediaWiki\Extension\PageTriage\Test\ApiPageTriageStatsTest::testFilteredArticleCount: Failed asserting that 0 matches expected 2
Closed, ResolvedPublic

Description

Presumably some core change (or perhaps an extension hook change) resulted in PageTriage CI failing.

19:31:53 > php tests/phpunit/phpunit.php '-c' 'tests/phpunit/suite.xml' '--testsuite' 'extensions' '--group' 'Database' '--exclude-group' 'Broken,ParserFuzz,Stub,Standalone'
19:31:54 Using PHP 7.4.33
19:31:54 PHPUnit 9.5.28 by Sebastian Bergmann and contributors.
19:31:58 
19:31:58 .............................................................   61 / 1478 (  4%)
19:32:12 .............................................................  122 / 1478 (  8%)
19:32:19 .............................................................  183 / 1478 ( 12%)
19:32:20 .............................................................  244 / 1478 ( 16%)
19:32:21 .............................................................  305 / 1478 ( 20%)
19:32:25 .............................................................  366 / 1478 ( 24%)
19:32:28 .............................................................  427 / 1478 ( 28%)
19:32:31 .............................................................  488 / 1478 ( 33%)
19:32:34 .............................................................  549 / 1478 ( 37%)
19:32:35 .............................................................  610 / 1478 ( 41%)
19:32:45 .............................................................  671 / 1478 ( 45%)
19:32:51 .............................................................  732 / 1478 ( 49%)
19:32:52 .............................................................  793 / 1478 ( 53%)
19:32:57 .............................................................  854 / 1478 ( 57%)
19:33:00 ..............F..............................................  915 / 1478 ( 61%)
19:33:11 .............................................................  976 / 1478 ( 66%)
19:33:11 ............................................................. 1037 / 1478 ( 70%)
19:33:17 ............................................................. 1098 / 1478 ( 74%)
19:33:18 ............................................................. 1159 / 1478 ( 78%)
19:33:19 ............................................................. 1220 / 1478 ( 82%)
19:33:19 ............................................................. 1281 / 1478 ( 86%)
19:33:20 ..................................S.......................... 1342 / 1478 ( 90%)
19:33:21 ............................................................. 1403 / 1478 ( 94%)
19:33:23 ............................................................. 1464 / 1478 ( 99%)
19:33:29 ..............                                                1478 / 1478 (100%)
19:33:30 
19:33:30 Time: 01:32.814, Memory: 381.00 MB
19:33:30 
19:33:30 There was 1 failure:
19:33:30 
19:33:30 1) MediaWiki\Extension\PageTriage\Test\ApiPageTriageStatsTest::testFilteredArticleCount
19:33:30 Failed asserting that 0 matches expected 2.
19:33:30 
19:33:30 /workspace/src/extensions/PageTriage/tests/phpunit/ApiPageTriageStatsTest.php:39
19:33:30 /workspace/src/tests/phpunit/MediaWikiIntegrationTestCase.php:520

This change https://gerrit.wikimedia.org/r/c/mediawiki/extensions/PageTriage/+/895226 was passing earlier today, and is now failing.

Event Timeline

kostajh triaged this task as Unbreak Now! priority.Mar 8 2023, 6:37 PM
kostajh created this task.
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 895843 had a related patch set uploaded (by Kosta Harlan; author: Kosta Harlan):

[mediawiki/extensions/PageTriage@master] tests: Set main cache to CACHE_NONE

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

Change 895843 merged by jenkins-bot:

[mediawiki/extensions/PageTriage@master] tests: Set main cache to CACHE_NONE

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

Explanation of what probably happened on wikitech-l mailing list:

https://lists.wikimedia.org/hyperkitty/list/wikitech-l@lists.wikimedia.org/thread/TWW5TQG4WHE6CF55BJZ6TAB424EISP5W/

Previously, PHPUnit enabled all caches except WANObjectCache. This is now enabled as well. If you encounter a new test failure this week on an extension repo that is not covered by the automated "wmf CI gate", then that may be the reason. This could point to a genuine bug in your code. However, you can choose to turn of all caching layers in the relevant test cases by calling $this->setMainCache( CACHE_NONE ).