From: Adam Wight Date: Thu, 12 Sep 2019 15:19:57 +0000 (+0200) Subject: Reset all logging tables together X-Git-Tag: 1.34.0-rc.0~238^2 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22auteur_infos%22%2C%22id_auteur=%24connect_id_auteur%22%29%20.%20%22?a=commitdiff_plain;h=1c5d140761b44e0839480b41029f2fb4e15c99f4;p=lhc%2Fweb%2Fwiklou.git Reset all logging tables together For example, leftover cruft in `log_search` will cause spurious associated_rev links between unrelated revisions and log entries. Bug: T227849 Change-Id: Ie344522229e4142f2c61a267b4d693051b813236 --- diff --git a/tests/phpunit/MediaWikiIntegrationTestCase.php b/tests/phpunit/MediaWikiIntegrationTestCase.php index 373ea9a88d..ecd5c05b17 100644 --- a/tests/phpunit/MediaWikiIntegrationTestCase.php +++ b/tests/phpunit/MediaWikiIntegrationTestCase.php @@ -1832,6 +1832,9 @@ abstract class MediaWikiIntegrationTestCase extends PHPUnit\Framework\TestCase { 'revision_actor_temp', 'slots', 'content', 'content_models', 'slot_roles', 'change_tag', ]; + $loggingTables = [ + 'logging', 'log_search', 'change_tag', + ]; $coreDBDataTables = array_merge( $userTables, $pageTables ); // some groups of tables are connected such that if any is used, all should be cleared @@ -1850,6 +1853,9 @@ abstract class MediaWikiIntegrationTestCase extends PHPUnit\Framework\TestCase { if ( array_intersect( $tablesUsed, $pageTables ) ) { $extraTables[] = $pageTables; } + if ( array_intersect( $tablesUsed, $loggingTables ) ) { + $extraTables[] = $loggingTables; + } if ( $extraTables !== [] ) { $tablesUsed = array_unique( array_merge( $tablesUsed, ...$extraTables ) ); }