From a67c737848389d32cd77512d06186db868eb5ac9 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Mon, 9 Dec 2013 01:02:42 +0100 Subject: [PATCH] Only run memcached tests if server is available. --- tests/lib/memcache/memcached.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/lib/memcache/memcached.php b/tests/lib/memcache/memcached.php index 4b38ae8ef3c..67d39717892 100644 --- a/tests/lib/memcache/memcached.php +++ b/tests/lib/memcache/memcached.php @@ -10,6 +10,13 @@ namespace Test\Memcache; class Memcached extends Cache { + static public function setUpBeforeClass() { + $instance = new \OC\Memcache\Memcached(uniqid()); + if ($instance->set(uniqid(), uniqid()) === false) { + self::markTestSkipped('memcached server seems to be down.'); + } + } + public function setUp() { if (!\OC\Memcache\Memcached::isAvailable()) { $this->markTestSkipped('The memcached extension is not available.'); -- 2.39.5