Skip to content
Snippets Groups Projects
Commit 28180485 authored by Thomas Müller's avatar Thomas Müller
Browse files

Merge pull request #6244 from owncloud/memcached-connectivity-tests

Only run memcached tests if server is available.
parents 22abc53e 67310b60
Branches
No related tags found
No related merge requests found
......@@ -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());
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment