Page MenuHomePhabricator

MediaWiki phpunit databaseless fails, because it's trying to access the database
Open, Needs TriagePublic

Description

imarlier@WMF2024 ~/dev/src/mediawiki/tests/phpunit (master●)$ php phpunit.php --configuration ./suite.xml --exclude-group Broken,Destructive,Database,Stub --debug-tests
<?
?>
Using PHP 7.1.16
PHPUnit 6.5.9 by Sebastian Bergmann and contributors.

[f20e996cc42fdd41ca2a6636] [no req]   Wikimedia\Rdbms\DBConnectionError from line 1152 of /Users/imarlier/dev/src/mediawiki/includes/libs/rdbms/loadbalancer/LoadBalancer.php: Cannot access the database: Unknown error (localhost)
Backtrace:
#0 /Users/imarlier/dev/src/mediawiki/includes/libs/rdbms/loadbalancer/LoadBalancer.php(768): Wikimedia\Rdbms\LoadBalancer->reportConnectionError()
#1 /Users/imarlier/dev/src/mediawiki/includes/GlobalFunctions.php(2798): Wikimedia\Rdbms\LoadBalancer->getConnection(integer, array, boolean)
#2 /Users/imarlier/dev/src/mediawiki/tests/phpunit/MediaWikiTestCase.php(447): wfGetDB(integer)
#3 /Users/imarlier/dev/src/mediawiki/vendor/phpunit/phpunit/src/Framework/TestSuite.php(755): MediaWikiTestCase->run(PHPUnit\Framework\TestResult)
#4 /Users/imarlier/dev/src/mediawiki/vendor/phpunit/phpunit/src/Framework/TestSuite.php(755): PHPUnit\Framework\TestSuite->run(PHPUnit\Framework\TestResult)
#5 /Users/imarlier/dev/src/mediawiki/vendor/phpunit/phpunit/src/Framework/TestSuite.php(755): PHPUnit\Framework\TestSuite->run(PHPUnit\Framework\TestResult)
#6 /Users/imarlier/dev/src/mediawiki/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(546): PHPUnit\Framework\TestSuite->run(PHPUnit\Framework\TestResult)
#7 /Users/imarlier/dev/src/mediawiki/vendor/phpunit/phpunit/src/TextUI/Command.php(195): PHPUnit\TextUI\TestRunner->doRun(PHPUnit\Framework\TestSuite, array, boolean)
#8 /Users/imarlier/dev/src/mediawiki/vendor/phpunit/phpunit/src/TextUI/Command.php(148): PHPUnit\TextUI\Command->run(array, boolean)
#9 /Users/imarlier/dev/src/mediawiki/tests/phpunit/phpunit.php(134): PHPUnit\TextUI\Command::main()
#10 /Users/imarlier/dev/src/mediawiki/maintenance/doMaintenance.php(94): PHPUnitMaintClass->execute()
#11 /Users/imarlier/dev/src/mediawiki/tests/phpunit/phpunit.php(173): require(string)
#12 {main}
imarlier@WMF2024 ~/dev/src/mediawiki/tests/phpunit (master●)$

I'm planning to track this down when I get a chance, but I'm not sure when that'll be so not assigning it to myself for the moment.