In r934707 I'm trying to get rid of tests/phpunit/phpunit.php. All tests are passing, except for UsageTrackingIntegrationTest::testUpdateUsage. I can reproduce this locally; in fact, the test is failing locally even when using the master version of Wikibase and core. I think the test might be implicitly making some assumptions on the configuration that are not always true, or something like that, though I still haven't pinpointed the cause of the failure.
Description
Details
Related Objects
Event Timeline
Also, note that this test is not failing in CI with MW master. That's why I'm suggesting it may have to do with config, where it would fail locally because I have a different config than CI, and it would also fail in CI when not using phpunit.php because the config bootstrapping is different. I still wasn't able to find the cause for the failure though, mostly because I know absolutely nothing about whatever the test is doing.
Looks like this has to do with the special config that is injected in Wikimedia CI.
The issue disappears locally if I add $wgWBClientSettings['allowDataAccessInUserLanguage'] = true; to my LocalSettings.php.
Also, the test run without phpunit.php shows that a few tests are skipped, apparently because they need $wgWBClientSettings['dataBridgeEnabled'] = true;.
Locally, as well as in CI when not using phpunit.php, those settings have the default value of false, which causes the skips and failures. Now looking into a solution.
Right, I didn't realize that since Wikibase doesn't have a single extension.json file, LocalSettingsGenerator will use the old style require_once, which includes Wikibase.php, which provides some overrides for CI.
I'm going to skip the test if the needed setting isn't enabled, and this will fix this task.
I'll leave it up to the maintainers whether the documentation (mw.org, readmes, something else) should mention that the config set by Wikibase.php might be useful for local development.
Change 934716 had a related patch set uploaded (by Daimona Eaytoy; author: Daimona Eaytoy):
[mediawiki/extensions/Wikibase@master] tests: Disable UsageTrackingIntegrationTest if allowDataAccessInUserLanguage is false
Change 935390 had a related patch set uploaded (by Lucas Werkmeister (WMDE); author: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/Wikibase@master] Set allowDataAccessInUserLanguage in UsageTrackingIntegrationTest
I uploaded an alternative way to improve the test, but I disagree that this fixes the task. It sounds like the issue here is that your changes cause our CI-only settings to not be loaded in CI. That’s a problem even if all the remaining tests are green.
Change 934716 abandoned by Daimona Eaytoy:
[mediawiki/extensions/Wikibase@master] Disable UsageTrackingIntegrationTest if allowDataAccessInUserLanguage is false
Reason:
See Ie084c56b5e
Yeah, sorry for the confusion. What I meant is that the patch above will fix the test failure when the setting's not enabled, which is what I was getting on my local. The config fix for switching to composer PHPUnit is r935034, which ensures that the test will be executed after the switch. That's in scope for T90875 though, not this task.
Change 935390 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Set allowDataAccessInUserLanguage in UsageTrackingIntegrationTest