diff options
author | Morris Jobke <hey@morrisjobke.de> | 2017-05-05 09:53:20 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-05 09:53:20 -0300 |
commit | ee2dfb24e02579e197d391f7937828c836c62f89 (patch) | |
tree | 9912c08376bb7c03cd6045c630acd63d026eaae7 /tests/lib/Memcache/RedisTest.php | |
parent | 15f43b263507f381e66f475f3f63d105c5340cf5 (diff) | |
parent | 0896d2b006df8597b767f8fd9483c96414a9532a (diff) | |
download | nextcloud-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.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.'); } |