summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rwxr-xr-xplugins/tests/check_http.t24
1 files changed, 9 insertions, 15 deletions
diff --git a/plugins/tests/check_http.t b/plugins/tests/check_http.t
index 2c89beb..c40bb07 100755
--- a/plugins/tests/check_http.t
+++ b/plugins/tests/check_http.t
@@ -392,27 +392,21 @@ sub run_common_tests {
392 skip "This doesn't seems to work all the time", 1 unless ($ENV{HTTP_EXTERNAL}); 392 skip "This doesn't seems to work all the time", 1 unless ($ENV{HTTP_EXTERNAL});
393 $cmd = "$command -f follow -u /redir_external -t 5"; 393 $cmd = "$command -f follow -u /redir_external -t 5";
394 eval { 394 eval {
395 local $SIG{ALRM} = sub { die "alarm\n" }; 395 $result = NPTest->testCmd( $cmd, 2 );
396 alarm(2); 396 };
397 $result = NPTest->testCmd( $cmd ); 397 like( $@, "/timeout in command: $cmd/", $cmd );
398 alarm(0); };
399 is( $@, "alarm\n", $cmd );
400 } 398 }
401 399
402 $cmd = "$command -u /timeout -t 5"; 400 $cmd = "$command -u /timeout -t 5";
403 eval { 401 eval {
404 local $SIG{ALRM} = sub { die "alarm\n" }; 402 $result = NPTest->testCmd( $cmd, 2 );
405 alarm(2); 403 };
406 $result = NPTest->testCmd( $cmd ); 404 like( $@, "/timeout in command: $cmd/", $cmd );
407 alarm(0); };
408 is( $@, "alarm\n", $cmd );
409 405
410 $cmd = "$command -f follow -u /redir_timeout -t 2"; 406 $cmd = "$command -f follow -u /redir_timeout -t 2";
411 eval { 407 eval {
412 local $SIG{ALRM} = sub { die "alarm\n" }; 408 $result = NPTest->testCmd( $cmd, 5 );
413 alarm(5); 409 };
414 $result = NPTest->testCmd( $cmd ); 410 is( $@, "", $cmd );
415 alarm(0); };
416 isnt( $@, "alarm\n", $cmd );
417 411
418} 412}