summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/lib/memcache/memcached.php12
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());
}
}