Page MenuHomePhabricator

MediaWikiFarm tests are broken
Open, Needs TriagePublic

Description

As can be seen in https://gerrit.wikimedia.org/r/544424, this extension's tests are failing at the moment, even if one fixes the problem with Composer dependencies. This is blocking https://gerrit.wikimedia.org/r/544423 which is needed to migrate MediaWiki to PHPUnit 8.

Event Timeline

MaxSem created this task.Oct 20 2019, 9:29 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 20 2019, 9:29 PM

I see that the extension has its own phpunit.xml file. I wonder whether we should just get rid of it, given that it's non-standard. Or at least keep it compatible with core's PHPUnit settings, but that sounds challenging...

I'd kill it and align to standard practices unless there's a hugely compelling reason I'm missing.

I don't think there's one. Apparently, it was introduced because it was faster than MW's PHPUnit config. But now in 2019 we have MediaWikiUnitTestCase etc., so let's just do what extensions normally do.

Of note, this extension is pretty challenging because it's claiming to support MW 1.3+... I'm working on it, too.

Change 545253 had a related patch set uploaded (by Daimona Eaytoy; owner: Daimona Eaytoy):
[mediawiki/extensions/MediaWikiFarm@master] [WIP] Remove stand-alone PHPUnit config

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

https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/MediaWikiFarm/+/545263/ seems to mitigate the issue, but, well... The tests are messing up with globals a lot (amongst other things), so something else broke (as expected).

Change 545263 had a related patch set uploaded (by Daimona Eaytoy; owner: Daimona Eaytoy):
[mediawiki/extensions/MediaWikiFarm@master] Fix broken tests

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

Daimona claimed this task.Oct 22 2019, 2:29 PM

I've gone crazy with all those globals, back-compat stuff, and reinvented wheels, but tests are working now!

Change 546777 had a related patch set uploaded (by MaxSem; owner: MaxSem):
[mediawiki/extensions/MediaWikiFarm@master] tests: Comaptibility with PHPUnit 8, preserving b/c

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

Change 546777 abandoned by MaxSem:
tests: Comaptibility with PHPUnit 8, preserving b/c

Reason:
Not interested in pursuing this.

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