HHVM: Prevent E_WARNING messages by Redis test in console output.
This commit is contained in:
parent
3a6d2fcc10
commit
567c246094
1 changed files with 10 additions and 0 deletions
|
@ -16,7 +16,17 @@ class Redis extends Cache {
|
|||
if (!\OC\Memcache\Redis::isAvailable()) {
|
||||
self::markTestSkipped('The redis extension is not available.');
|
||||
}
|
||||
|
||||
set_error_handler(
|
||||
function($errno, $errstr) {
|
||||
restore_error_handler();
|
||||
self::markTestSkipped($errstr);
|
||||
},
|
||||
E_WARNING
|
||||
);
|
||||
$instance = new \OC\Memcache\Redis(self::getUniqueID());
|
||||
restore_error_handler();
|
||||
|
||||
if ($instance->set(self::getUniqueID(), self::getUniqueID()) === false) {
|
||||
self::markTestSkipped('redis server seems to be down.');
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue