aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Memcache/RedisTest.php
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2017-05-05 09:53:20 -0300
committerGitHub <noreply@github.com>2017-05-05 09:53:20 -0300
commitee2dfb24e02579e197d391f7937828c836c62f89 (patch)
tree9912c08376bb7c03cd6045c630acd63d026eaae7 /tests/lib/Memcache/RedisTest.php
parent15f43b263507f381e66f475f3f63d105c5340cf5 (diff)
parent0896d2b006df8597b767f8fd9483c96414a9532a (diff)
downloadnextcloud-server-ee2dfb24e02579e197d391f7937828c836c62f89.tar.gz
nextcloud-server-ee2dfb24e02579e197d391f7937828c836c62f89.zip
Merge pull request #4703 from nextcloud/improve-memcache-test
Make cache tests a bit more clear
Diffstat (limited to 'tests/lib/Memcache/RedisTest.php')
-rw-r--r--tests/lib/Memcache/RedisTest.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/lib/Memcache/RedisTest.php b/tests/lib/Memcache/RedisTest.php
index e707f30fb5b..6a0a82f6aa7 100644
--- a/tests/lib/Memcache/RedisTest.php
+++ b/tests/lib/Memcache/RedisTest.php
@@ -24,6 +24,7 @@ class RedisTest extends Cache {
},
E_WARNING
);
+ $instance = null;
try {
$instance = new \OC\Memcache\Redis(self::getUniqueID());
} catch (\RuntimeException $e) {
@@ -34,6 +35,10 @@ class RedisTest extends Cache {
self::markTestSkipped($errorOccurred);
}
+ if ($instance === null) {
+ throw new \Exception('redis server is not reachable');
+ }
+
if ($instance->set(self::getUniqueID(), self::getUniqueID()) === false) {
self::markTestSkipped('redis server seems to be down.');
}