hoo created this task. hoo added projects: MediaWiki-extensions-WikibaseClient, Wikidata. Restricted Application added a subscriber: Aklapper.
TASK DESCRIPTION If the WikibaseClient setting `repoDatabase` isn't false, but referring to the local wiki's database by name, the client phpunit tests will fail. This is because `TermSqlIndex` (via `DBAccessBase` which it extends) uses an explicitly passed wiki for calling `LoadBalancer::getConnection`. The tests use the wiki name from the actual configuration, which makes `TermSqlIndex` act on the real database and not the cloned one (as the test mocking for MediaWiki doesn't prevent/ handle someone from explicitly wanting a connection to the real DB). I see a few ways to handle this: - Explicitly set the setting to `false` in all relevant tests - Change `WikibaseClient::getRepositoryDefinitionsFromSettings` so that it ignores the setting in tests - Change the MediaWiki `LoadBalancer` to detect connection attempts to the actual DB and connect to the unittest-clone instead - Change `DBAccessBase` to detect connection attempts to the actual DB and connect to the unittest-clone instead TASK DETAIL https://phabricator.wikimedia.org/T221025 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: hoo Cc: Aklapper, hoo, alaa_wmde, Nandana, Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer, _jensen, rosalieper, Wikidata-bugs, aude, Mbch331
_______________________________________________ Wikidata-bugs mailing list Wikidata-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs