faster tests

This commit is contained in:
Shish 2015-09-20 23:10:33 +01:00
parent fc2bbefcb9
commit 82ab2a8305
2 changed files with 5 additions and 2 deletions

View File

@ -71,7 +71,7 @@ class ResLimitTest extends ShimmiePHPUnitTestCase {
# other extensions' test suites # other extensions' test suites
public function tearDown() { public function tearDown() {
parent::tearDown(); parent::tearDown();
global $config; global $config;
$config->set_int("upload_min_height", -1); $config->set_int("upload_min_height", -1);
$config->set_int("upload_min_width", -1); $config->set_int("upload_min_width", -1);

View File

@ -9,6 +9,9 @@
class VarnishPurger extends Extension { class VarnishPurger extends Extension {
private function curl_purge($path) { 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)); $url = make_http(make_link($path));
$ch = curl_init(); $ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_URL, $url);
@ -17,7 +20,7 @@ class VarnishPurger extends Extension {
$result = curl_exec($ch); $result = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch); curl_close($ch);
return $result; //return $result;
} }
public function onCommentPosting(CommentPostingEvent $event) { public function onCommentPosting(CommentPostingEvent $event) {