jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/344751 )
Change subject: Throw RuntimeException when caching doesn't work in
testDispatchCoordinator
......................................................................
Throw RuntimeException when caching doesn't work in testDispatchCoordinator
Bug: T157308
Change-Id: If179be912f3b5de680533abf9ba618d6ca4fb1b3
---
M repo/tests/testDispatchCoordinator.php
1 file changed, 4 insertions(+), 0 deletions(-)
Approvals:
Daniel Kinzler: Looks good to me, approved
jenkins-bot: Verified
Thiemo Mättig (WMDE): Looks good to me, but someone else must approve
diff --git a/repo/tests/testDispatchCoordinator.php
b/repo/tests/testDispatchCoordinator.php
index 4047f1e..1565f81 100644
--- a/repo/tests/testDispatchCoordinator.php
+++ b/repo/tests/testDispatchCoordinator.php
@@ -7,6 +7,7 @@
use Maintenance;
use MediaWiki\MediaWikiServices;
use MWException;
+use RuntimeException;
use WANObjectCache;
use Wikibase\Repo\Store\Sql\LockManagerSqlChangeDispatchCoordinator;
use Wikibase\Repo\WikibaseRepo;
@@ -147,6 +148,9 @@
private function readTestValue( $key ) {
$memcKey = wfMemcKey( 'test-dispatch-coordinator-' . $key );
$value = $this->cache->get( $memcKey );
+ if ( $value === null ) {
+ throw new RuntimeException( "Caching mechanism doesn't
work as expected." );
+ }
$this->log( "Got cache key $key: $value" );
return is_string( $value ) ? (int)$value : $value;
}
--
To view, visit https://gerrit.wikimedia.org/r/344751
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: If179be912f3b5de680533abf9ba618d6ca4fb1b3
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup <[email protected]>
Gerrit-Reviewer: Daniel Kinzler <[email protected]>
Gerrit-Reviewer: Ladsgroup <[email protected]>
Gerrit-Reviewer: Thiemo Mättig (WMDE) <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits