]> source.dussan.org Git - nextcloud-server.git/commitdiff
Only run memcached tests if server is available.
authorAndreas Fischer <bantu@owncloud.com>
Mon, 9 Dec 2013 00:02:42 +0000 (01:02 +0100)
committerAndreas Fischer <bantu@owncloud.com>
Mon, 9 Dec 2013 00:02:42 +0000 (01:02 +0100)
tests/lib/memcache/memcached.php

index 4b38ae8ef3c54b3e92011ceb55b13b23efba0453..67d3971789220dd92cc4cc25fbb4ddf2c10a3c36 100644 (file)
 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.');