faster tests
This commit is contained in:
parent
fc2bbefcb9
commit
82ab2a8305
@ -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) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user