Skip to content
Permalink
Browse files

More fixes to avoid segfaults in hhvm

  • Loading branch information...
lorenzo committed Feb 13, 2014
1 parent 65048bd commit ec015564f3f3fe957e4e4cd265c29f6518f4a13f
@@ -237,7 +237,7 @@ public function clearGroup($group) {
* Disconnects from the redis server
*/
public function __destruct() {
if (!$this->_config['persistent']) {
if (empty($this->_config['persistent']) && $this->_Redis instanceof \Redis) {
$this->_Redis->close();
}
}
@@ -656,7 +656,7 @@ public function testConfigurationConflict() {
* @return void
*/
public function testClear() {
$this->assertFalse(defined('HHVM_VERSION'), 'Remove me when travis updates hhvm to 2.5');
$this->assertFalse(defined('HHVM_VERSION'), 'Crashes HHVM');
Cache::config('memcached2', array(
'engine' => 'Memcached',
'prefix' => 'cake2_',
@@ -33,6 +33,7 @@ class RedisEngineTest extends TestCase {
* @return void
*/
public function setUp() {
$this->assertFalse(defined('HHVM_VERSION'), 'Crashes HHVM');
parent::setUp();
$this->skipIf(!class_exists('Redis'), 'Redis is not installed or configured properly.');
@@ -242,6 +242,7 @@ public function testReset() {
*/
public function testEnableCryptoSocketExceptionNoSsl() {
$this->skipIf(!extension_loaded('openssl'), 'OpenSSL is not enabled cannot test SSL.');
$this->assertFalse(defined('HHVM_VERSION'), 'Broken on HHVM');
$configNoSslOrTls = array('host' => 'localhost', 'port' => 80, 'timeout' => 0.1);
// testing exception on no ssl socket server for ssl and tls methods
@@ -47,7 +47,6 @@ class XmlTest extends TestCase {
* @return void
*/
public function setUp() {
$this->assertFalse(defined('HHVM_VERSION'), 'Causes segfault on HHVM');
parent::setUp();
$this->_appEncoding = Configure::read('App.encoding');
Configure::write('App.encoding', 'UTF-8');
@@ -137,6 +136,7 @@ public static function invalidDataProvider() {
* @return void
*/
public function testBuildInvalidData($value) {
$this->assertFalse(defined('HHVM_VERSION') && !empty($value), 'Segfaults HHVM');
Xml::build($value);
}

0 comments on commit ec01556

Please sign in to comment.
You can’t perform that action at this time.