diff options
author | Morris Jobke <hey@morrisjobke.de> | 2017-05-03 17:31:09 -0300 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2017-05-04 19:37:40 -0300 |
commit | 0896d2b006df8597b767f8fd9483c96414a9532a (patch) | |
tree | d573298b0ffbf2363b87eeb4f3308122acfe6472 /tests/lib/Memcache | |
parent | 8dc2749296b44cc79a1fe50f298f3b2034970da4 (diff) | |
download | nextcloud-server-0896d2b006df8597b767f8fd9483c96414a9532a.tar.gz nextcloud-server-0896d2b006df8597b767f8fd9483c96414a9532a.zip |
Make cache tests a bit more clear
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'tests/lib/Memcache')
-rw-r--r-- | tests/lib/Memcache/RedisTest.php | 5 |
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.'); } |