From: Andreas Fischer Date: Mon, 9 Dec 2013 00:02:42 +0000 (+0100) Subject: Only run memcached tests if server is available. X-Git-Tag: v7.0.0alpha2~1049^2~1 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=a67c737848389d32cd77512d06186db868eb5ac9;p=nextcloud-server.git Only run memcached tests if server is available. --- 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.');