summaryrefslogtreecommitdiffstats
path: root/tests/lib/Memcache/RedisTest.php
diff options
context:
space:
mode:
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.');
}