This test has been failing intermittently for the past few weeks.
https://integration.wikimedia.org/ci/job/mediawiki-phpunit-php55-trusty/4720/console
00:06:06.242 There was 1 failure: 00:06:06.242 00:06:06.242 1) TemplateCategoriesTest::testTemplateCategories 00:06:06.242 Verify that the page is no longer in the category after template deletion 00:06:06.242 Failed asserting that two arrays are equal. 00:06:06.243 --- Expected 00:06:06.243 +++ Actual 00:06:06.243 @@ @@ 00:06:06.243 Array ( 00:06:06.243 + 'Category:Solved_bugs_2' => 'Categorized from template' 00:06:06.243 ) 00:06:06.243 00:06:06.243 /home/jenkins/workspace/mediawiki-phpunit-php55-trusty/src/tests/phpunit/includes/TemplateCategoriesTest.php:93 00:06:06.243 /home/jenkins/workspace/mediawiki-phpunit-php55-trusty/src/tests/phpunit/MediaWikiTestCase.php:402 00:06:06.243 /home/jenkins/workspace/mediawiki-phpunit-php55-trusty/src/maintenance/doMaintenance.php:111
The test suite itself has not been modified in years, so it's likely an indirect problem caused by a behaviour change in JobQueue, which it uses. The problem is basically that it makes an edit, and observes that a page becomes a member of a certain category. Since this logic is deferred through jobs, it needs to force a job queue run, which doesn't seem to work consistently.
https://github.com/wikimedia/mediawiki/blob/master/tests/phpunit/includes/TemplateCategoriesTest.php
$title = Title::newFromText( "Categorized from template" ); $page = WikiPage::factory( $title ); $page->doEditContent( .. ); $template = WikiPage::factory( Title::newFromText( 'Template:Categorising template' ) ); $template->doEditContent( .. ); // Run the job queue JobQueueGroup::destroySingletons(); $jobs = new RunJobs; $jobs->loadParamsAndArgs( null, [ 'quiet' => true ], null ); $jobs->execute(); // Make sure page is in the category $this->assertEquals( [ .. ], $title->getParentCategories() );
@aaron Any ideas perhaps?