Page MenuHomePhabricator

Jenkins: Set up PHPUnit testing on MySQL backend
Closed, ResolvedPublic

Description

Currently, we run the PHPUnit test suite using the SQLite backend using Jenkins upon committing code into core.

However, Wikimedias's setup relies on MySQL and MySQL is also MediaWiki's suggested DBMS.

Hence, it would be great to have Jenkins additionally run the PHPUnit test suite using the MySQL backend.

P.S.: A similar bug is said to exist in bugzilla—however, I could not find such a bug.


Version: unspecified
Severity: enhancement
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=45194

Details

Reference
bz35912

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 12:14 AM
bzimport set Reference to bz35912.
bzimport added a subscriber: Unknown Object (MLST).
QChris created this task.Apr 12 2012, 2:02 PM
  • This bug has been confirmed by popular vote. ***

fwiw I would love to see this happen, given that WMF's production (and labs) backend is MySQL and not SQLite.

scfc added a comment.Oct 4 2012, 12:00 PM

Any update on this?

ori added a comment.Feb 24 2013, 6:50 PM

Could someone provide examples of the sort of bugs or crashes that would have been caught by using MySQL as the back-end for the unit tests?

There are a couple cases I'm aware of with using SQLite:

  1. The math extension can not run all of its tests, since SQLite has global indices. See https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/extensions/Math.git;a=blob;f=tests/MathDatabaseTest.php;h=f909f7f20cdcf7814d2ac9c08bc777c25401e764;hb=refs/heads/master#l86 . Judging by that comment, all other databases including MySQL work.
  2. Similarly, Echo had an issue since SQLite doesn't have "ALTER TABLE CHANGE" (https://gerrit.wikimedia.org/r/#/c/64594/).

Of course, it's preferable to support multiple databases, including SQLite if possible. But it would be very useful to also test in MySQL both because the behavior can differ, and because SQLite sometimes just doesn't work for what we currently need.

Since I started working on CI we always wanted to test against different database backend. I am not sure the full test suite is really needed, but we should at least run the installer, that will most probably catch up the commons issues.

Not a priority

hashar lowered the priority of this task from Low to Lowest.Nov 24 2014, 11:52 AM
hashar set Security to None.
greg raised the priority of this task from Lowest to Normal.Mar 2 2015, 5:14 PM
greg added a subscriber: greg.

Changing priority: testing on top of the software we use in production is a good thing.

Krinkle claimed this task.Mar 20 2015, 11:02 PM
Krinkle moved this task from Next to In-progress on the Continuous-Integration-Infrastructure board.
Krinkle removed a project: Wikimedia-Hackathon-2015.
Krinkle removed a subscriber: Unknown Object (MLST).

Acting on this ahead of Wikimedia-Hackathon-2015 due to SQLite issues and MySQL being the interim solution for it.

Change 198293 had a related patch set uploaded (by Krinkle):
mwext-{name}-qunit: To hhvm/karma/chromium from zend/php53/phantomjs

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

Change 198293 merged by jenkins-bot:
mwext-{name}-qunit: To hhvm/karma/chromium from zend/php53/phantomjs

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

Change 198424 had a related patch set uploaded (by Krinkle):
mediawiki-phpunit-{phpflavour}: Use mysql instead of sqlite

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

Change 198424 merged by jenkins-bot:
mediawiki-phpunit-{phpflavour}: Use mysql instead of sqlite

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

Change 198444 had a related patch set uploaded (by Krinkle):
mw-phpunit-composer, mw-extensions, integration-phpunit: sqlite > msyql

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

Change 198444 merged by jenkins-bot:
mw-phpunit-composer, mw-extensions, integration-phpunit: sqlite > mysyql

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

Krinkle removed a subscriber: gerritbot.

Change 198773 had a related patch set uploaded (by Krinkle):
Migrate prepare-mediawiki to MySQL (affects testextension mwext-qunit)

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

Krinkle closed this task as Resolved.Mar 25 2015, 3:29 AM
Krinkle moved this task from In-progress to Done on the Continuous-Integration-Infrastructure board.

Change 198773 merged by jenkins-bot:
Migrate prepare-mediawiki to MySQL (affects testextension mwext-qunit)

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