jenkins-bot has submitted this change and it was merged. Change subject: Make sure there is a cache in EditEntityTest ......................................................................
Make sure there is a cache in EditEntityTest \User uses \ObjectCache for caching since Ifa0bf389720a09a931ee6466b993f787d83a09a7. It uses the cache returned by `getLocalClusterInstance`, which builds based on `$wgMainCacheType`. That is CACHE_NONE by default, but we need a cache for this to work. Change-Id: I054b31d1ffb3a164997df2f43346c76bc49447ca (cherry picked from commit 56488ab8e561dc7a376dc32a0b2da202a21ec254) --- M repo/tests/phpunit/includes/EditEntityTest.php 1 file changed, 9 insertions(+), 5 deletions(-) Approvals: Aude: Looks good to me, approved jenkins-bot: Verified diff --git a/repo/tests/phpunit/includes/EditEntityTest.php b/repo/tests/phpunit/includes/EditEntityTest.php index 1731219..9d97a65 100644 --- a/repo/tests/phpunit/includes/EditEntityTest.php +++ b/repo/tests/phpunit/includes/EditEntityTest.php @@ -3,7 +3,8 @@ namespace Wikibase\Test; use FauxRequest; -use HashBagOStuff; +use MediaWikiTestCase; +use ObjectCache; use PHPUnit_Framework_MockObject_Matcher_Invocation; use ReflectionMethod; use RequestContext; @@ -34,7 +35,7 @@ * @licence GNU GPL v2+ * @author Daniel Kinzler */ -class EditEntityTest extends \MediaWikiTestCase { +class EditEntityTest extends MediaWikiTestCase { private function getUser( $name ) { $user = User::newFromName( $name ); @@ -639,12 +640,15 @@ ) ); - // make sure we have a fresh, working cache + // make sure we have a working cache $this->setMwGlobals( - 'wgMemc', - new HashBagOStuff() + 'wgMainCacheType', + CACHE_ANYTHING ); + // make sure we have a fresh cache + ObjectCache::clear(); + $user = $this->getUser( 'UserForTestAttemptSaveRateLimit' ); $this->setUserGroups( $user, $groups ); -- To view, visit https://gerrit.wikimedia.org/r/249446 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I054b31d1ffb3a164997df2f43346c76bc49447ca Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: wmf/1.27.0-wmf.3b Gerrit-Owner: Aude <aude.w...@gmail.com> Gerrit-Reviewer: Adrian Lang <adrian.he...@wikimedia.de> Gerrit-Reviewer: Aude <aude.w...@gmail.com> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits