MCR refactoring broke tests/parser/parserTests.php
Closed, DuplicatePublic

Description

This used to work, but running parserTests.php directly is now broken:

php tests/parser/parserTests.php --quiet --use-tidy-config
This is MediaWiki version 1.31.0-alpha (9dcc56b).

Running parser tests from "/home/cananian/Projects/Wikimedia/core/tests/parser/parserTests.txt"...
[c022e031b235e634852a9aa3] [no req]   MWException from line 1480 of /home/cananian/Projects/Wikimedia/core/includes/Storage/RevisionStore.php: RevisionStore for mediawiki-dev-parsertest_ cannot be used with a DB connection for mediawiki?hdev-parsertest_
Backtrace:
#0 /home/cananian/Projects/Wikimedia/core/includes/Storage/RevisionStore.php(271): MediaWiki\Storage\RevisionStore->checkDatabaseWikiId(Wikimedia\Rdbms\DatabaseMysqli)
#1 /home/cananian/Projects/Wikimedia/core/includes/Revision.php(978): MediaWiki\Storage\RevisionStore->insertRevisionOn(MediaWiki\Storage\MutableRevisionRecord, Wikimedia\Rdbms\DatabaseMysqli)
#2 /home/cananian/Projects/Wikimedia/core/includes/page/WikiPage.php(1909): Revision->insertOn(Wikimedia\Rdbms\DatabaseMysqli)
#3 /home/cananian/Projects/Wikimedia/core/includes/page/WikiPage.php(1665): WikiPage->doCreate(WikitextContent, integer, User, string, array)
#4 /home/cananian/Projects/Wikimedia/core/tests/parser/ParserTestRunner.php(1622): WikiPage->doEditContent(WikitextContent, string, integer)
#5 /home/cananian/Projects/Wikimedia/core/tests/parser/ParserTestRunner.php(1566): ParserTestRunner->addArticle(string, string, string, integer)
#6 /home/cananian/Projects/Wikimedia/core/tests/parser/ParserTestRunner.php(755): ParserTestRunner->addArticles(array)
#7 /home/cananian/Projects/Wikimedia/core/tests/parser/ParserTestRunner.php(687): ParserTestRunner->runTests(array)
#8 /home/cananian/Projects/Wikimedia/core/tests/parser/parserTests.php(185): ParserTestRunner->runTestsFromFiles(array)
#9 /home/cananian/Projects/Wikimedia/core/maintenance/doMaintenance.php(94): ParserTestsMaintenance->execute()
#10 /home/cananian/Projects/Wikimedia/core/tests/parser/parserTests.php(196): require_once(string)
#11 {main}

git-bisect says that:

9dcc56b3c9e7a3212d0900ee23808b9402cad952 is the first bad commit
commit 9dcc56b3c9e7a3212d0900ee23808b9402cad952
Author: daniel <daniel.kinzler@wikimedia.de>
Date:   Thu Aug 31 20:41:04 2017 +0200

    [MCR] Turn Revision into a proxy to new code.
    
    Change-Id: I4f24e7fbb683cb51f3fd8b250732bae9c7541ba2
cscott created this task.Jan 3 2018, 9:09 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJan 3 2018, 9:09 PM
Anomie added a subscriber: Anomie.

Not exactly a duplicate, but looks to be the same underlying cause.