diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2013-12-10 12:14:36 -0800 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2013-12-10 12:14:36 -0800 |
commit | 28180485d9d767a081656e403fe7c8210957f976 (patch) | |
tree | 364713e53c994455bbbe4ff5a19fa64fabf8f2ba /tests | |
parent | 22abc53e3b1dcebeaed2b549e685c53887bf05c0 (diff) | |
parent | 67310b60f738eebd7d4f121cd4ff1e838da2f51a (diff) | |
download | nextcloud-server-28180485d9d767a081656e403fe7c8210957f976.tar.gz nextcloud-server-28180485d9d767a081656e403fe7c8210957f976.zip |
Merge pull request #6244 from owncloud/memcached-connectivity-tests
Only run memcached tests if server is available.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/memcache/memcached.php | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/tests/lib/memcache/memcached.php b/tests/lib/memcache/memcached.php index 4b38ae8ef3c..fdab32693ff 100644 --- a/tests/lib/memcache/memcached.php +++ b/tests/lib/memcache/memcached.php @@ -10,11 +10,17 @@ namespace Test\Memcache; class Memcached extends Cache { - public function setUp() { + static public function setUpBeforeClass() { if (!\OC\Memcache\Memcached::isAvailable()) { - $this->markTestSkipped('The memcached extension is not available.'); - return; + self::markTestSkipped('The memcached extension is not available.'); + } + $instance = new \OC\Memcache\Memcached(uniqid()); + if ($instance->set(uniqid(), uniqid()) === false) { + self::markTestSkipped('memcached server seems to be down.'); } + } + + public function setUp() { $this->instance = new \OC\Memcache\Memcached(uniqid()); } } |