From: Antoine Musso Date: Fri, 4 Nov 2016 16:38:43 +0000 (+0100) Subject: tests: stop updating the search engine X-Git-Tag: 1.31.0-rc.0~4890^2 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/ajouter.php?a=commitdiff_plain;h=ab8bafeacc9a726384aec537c2efe6db99f5c975;p=lhc%2Fweb%2Fwiklou.git tests: stop updating the search engine While running includes/api tests, profiling reports tests are doing hundred of inserts followed by hundred of matching deletes. That is due to the search engine updates. For almost all tests, there is no need to update the search engine, that is a waste of I/O and CPU cycles. Speed up the run by using 'SearchEngineDummy'. Our search tests still pass since they take care of setting up a search engine. Change-Id: Ic10e989e27fd3901ea215f544a0490baef57f0a4 --- diff --git a/tests/common/TestSetup.php b/tests/common/TestSetup.php index 6c3ad0761e..53e724bbed 100644 --- a/tests/common/TestSetup.php +++ b/tests/common/TestSetup.php @@ -15,6 +15,7 @@ class TestSetup { global $wgMainStash; global $wgLanguageConverterCacheType, $wgUseDatabaseMessages; global $wgLocaltimezone, $wgLocalisationCacheConf; + global $wgSearchType; global $wgDevelopmentWarnings; global $wgSessionProviders, $wgSessionPbkdf2Iterations; global $wgJobTypeConf; @@ -50,6 +51,9 @@ class TestSetup { $wgLocalisationCacheConf['storeClass'] = 'LCStoreNull'; + // Do not bother updating search tables + $wgSearchType = 'SearchEngineDummy'; + // Generic MediaWiki\Session\SessionManager configuration for tests // We use CookieSessionProvider because things might be expecting // cookies to show up in a FauxRequest somewhere.