A partial archive of https://discourse-mediawiki.wmflabs.org as of Saturday May 21, 2022.

Is the “Destructive” test group still relevant?

LucasWerkmeisterWMDE

The unit testing manual describes a group for destructive tests:

  • Destructive : Tests that alter or destroy data should be put into group Destructive.

I don’t know if this group is still necessary. All of its uses in MediaWiki core were removed back in 2011 by Chad (732e3f1271), since tests now operate on cloned tables, not the real ones. MediaWiki code search only finds one test in the group, in the TimedMediaHandler extension, where it was added just a few months before the removal of Destructive in core (e52acb6d48); it looks like it was just never removed there.

The Makefile still supports the group, and make safe will not run Destructive tests; however, it looks like this capability is no longer useful nor used. Can it be removed? (Or if not, we should at least clarify the documentation on mediawiki.org.)

LucasWerkmeisterWMDE

I’ve now submitted I2b1c60b939 to remove the group from TimedMediaHandler; if no one objects, I think I’ll later update the documentation to discourage people from using the Destructive group a bit.