From: Aaron Schulz Date: Thu, 27 Oct 2011 01:44:58 +0000 (+0000) Subject: Quick and ugly fix to stop installs with CACHE_DB from immediately failing with DB... X-Git-Tag: 1.31.0-rc.0~26886 X-Git-Url: http://git.cyclocoop.org/%24self?a=commitdiff_plain;h=f634e51b76d429877d714043f796050b642b2511;p=lhc%2Fweb%2Fwiklou.git Quick and ugly fix to stop installs with CACHE_DB from immediately failing with DB errors. Something is wonked with the order of temp table creation. --- diff --git a/tests/parser/parserTest.inc b/tests/parser/parserTest.inc index 259fc2ffdc..2b52fb503a 100644 --- a/tests/parser/parserTest.inc +++ b/tests/parser/parserTest.inc @@ -136,7 +136,8 @@ class ParserTest { $wgUser, $wgLang, $wgOut, $wgRequest, $wgStyleDirectory, $wgEnableParserCache, $wgNamespaceAliases, $wgNamespaceProtection, $wgLocalFileRepo, $parserMemc, $wgThumbnailScriptPath, $wgScriptPath, - $wgArticlePath, $wgStyleSheetPath, $wgScript, $wgStylePath, $wgExtensionAssetsPath; + $wgArticlePath, $wgStyleSheetPath, $wgScript, $wgStylePath, $wgExtensionAssetsPath, + $wgMainCacheType, $wgMessageCacheType, $wgParserCacheType; $wgScript = '/index.php'; $wgScriptPath = '/'; @@ -158,10 +159,20 @@ class ParserTest { $wgNamespaceAliases['Image'] = NS_FILE; $wgNamespaceAliases['Image_talk'] = NS_FILE_TALK; + // XXX: tests won't run without this (for CACHE_DB) + if ( $wgMainCacheType === CACHE_DB ) { + $wgMainCacheType = CACHE_NONE; + } + if ( $wgMessageCacheType === CACHE_DB ) { + $wgMessageCacheType = CACHE_NONE; + } + if ( $wgParserCacheType === CACHE_DB ) { + $wgParserCacheType = CACHE_NONE; + } $wgEnableParserCache = false; DeferredUpdates::clearPendingUpdates(); - $wgMemc = wfGetMainCache(); + $wgMemc = wfGetMainCache(); // checks $wgMainCacheType $messageMemc = wfGetMessageCacheStorage(); $parserMemc = wfGetParserCacheStorage();