From 82ab2a8305e48efbecd3ed2db68752d3cea7b6d7 Mon Sep 17 00:00:00 2001 From: Shish Date: Sun, 20 Sep 2015 23:10:33 +0100 Subject: [PATCH] faster tests --- ext/res_limit/test.php | 2 +- ext/varnish/main.php | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ext/res_limit/test.php b/ext/res_limit/test.php index 303a9657..0ed418c9 100644 --- a/ext/res_limit/test.php +++ b/ext/res_limit/test.php @@ -71,7 +71,7 @@ class ResLimitTest extends ShimmiePHPUnitTestCase { # other extensions' test suites public function tearDown() { parent::tearDown(); - + global $config; $config->set_int("upload_min_height", -1); $config->set_int("upload_min_width", -1); diff --git a/ext/varnish/main.php b/ext/varnish/main.php index c80e670d..bb3882f1 100644 --- a/ext/varnish/main.php +++ b/ext/varnish/main.php @@ -9,6 +9,9 @@ class VarnishPurger extends Extension { private function curl_purge($path) { + // waiting for curl timeout adds ~5 minutes to unit tests + if(defined("UNITTEST")) return; + $url = make_http(make_link($path)); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); @@ -17,7 +20,7 @@ class VarnishPurger extends Extension { $result = curl_exec($ch); $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch); - return $result; + //return $result; } public function onCommentPosting(CommentPostingEvent $event) {