Page MenuHomePhabricator

ArticleCreationWorkflow: phpunit tests fail with: RuntimeException: Database backend disabled
Closed, ResolvedPublic

Description

The PHPUnit tests for Extension:ArticleCreationWorkflow fail, I have noticed that after approving a change to .gitreview: https://gerrit.wikimedia.org/r/c/mediawiki/extensions/ArticleCreationWorkflow/+/955019

PHPUnit reports 13 errors all under ArticleCreationWorkflow\Tests\WorkflowTest. The first one is:

1) ArticleCreationWorkflow\Tests\WorkflowTest::testShouldInterceptPage with data set #0 (array(array('autoconfirmed', false), array('createpage', false), array('createpagemainns', false)), MediaWiki\Title\Title Object (...), false, 'Wrong NS, do nothing')
RuntimeException: Database backend disabled

/workspace/src/includes/libs/rdbms/loadbalancer/LoadBalancerDisabled.php:96
/workspace/src/includes/cache/LinkCache.php:439
/workspace/src/includes/cache/LinkCache.php:474
/workspace/src/includes/page/PageStore.php:189
/workspace/src/includes/page/PageStore.php:155
/workspace/src/includes/page/PageStore.php:327
/workspace/src/includes/title/Title.php:3852
/workspace/src/includes/title/Title.php:2606
/workspace/src/includes/title/Title.php:3239
/workspace/src/extensions/ArticleCreationWorkflow/includes/Workflow.php:53
/workspace/src/extensions/ArticleCreationWorkflow/tests/phpunit/WorkflowTest.php:55
phpvfscomposer:///workspace/src/vendor/phpunit/phpunit/phpunit:97
=== Logs generated by test case
[objectcache] [debug] MainWANObjectCache using store {class} {"class":"HashBagOStuff"}
[localisation] [debug] LocalisationCache using store LCStoreNull []
[localisation] [debug] LocalisationCache::isExpired(en): cache missing, need to make one []

The previous change made in August 19th passed. I am pretty sure that is related to a recent refactoring in MediaWiki, maybe @Daimona would know :)

Event Timeline

Change 959195 had a related patch set uploaded (by Daimona Eaytoy; author: Daimona Eaytoy):

[mediawiki/extensions/ArticleCreationWorkflow@master] Fix failing WorkflowTest

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

Indeed, caused by r938387, and also r814359 which caused another failure further down the line.

Change 959195 merged by jenkins-bot:

[mediawiki/extensions/ArticleCreationWorkflow@master] Fix failing WorkflowTest

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

Indeed, caused by r938387, and also r814359 which caused another failure further down the line.

Thank you for the fix!