changeset 272:957fe2a76aa7

Tests: remove conditional startup from upstream keepalive tests.
author Maxim Dounin <mdounin@mdounin.ru>
date Thu, 21 Mar 2013 20:40:26 +0400
parents 1a6eef7ac914
children 36c75df75ca4
files fastcgi_keepalive.t proxy_keepalive.t
diffstat 2 files changed, 4 insertions(+), 20 deletions(-) [+]
line wrap: on
line diff
--- a/fastcgi_keepalive.t
+++ b/fastcgi_keepalive.t
@@ -21,7 +21,7 @@ use Test::Nginx;
 select STDERR; $| = 1;
 select STDOUT; $| = 1;
 
-my $t = Test::Nginx->new()->write_file_expand('nginx.conf', <<'EOF');
+my $t = Test::Nginx->new()->write_file_expand('nginx.conf', <<'EOF')->plan(6);
 
 %%TEST_GLOBALS%%
 
@@ -52,15 +52,7 @@ http {
 EOF
 
 $t->run_daemon(\&fastcgi_test_daemon);
-
-eval {
-	open OLDERR, ">&", \*STDERR; close STDERR;
-	$t->run();
-	open STDERR, ">&", \*OLDERR;
-};
-plan(skip_all => 'no keepalive patches') if $@;
-
-$t->plan(6);
+$t->run();
 
 ###############################################################################
 
--- a/proxy_keepalive.t
+++ b/proxy_keepalive.t
@@ -24,7 +24,7 @@ use Test::Nginx;
 select STDERR; $| = 1;
 select STDOUT; $| = 1;
 
-my $t = Test::Nginx->new()->has(qw/http proxy ssi rewrite/)
+my $t = Test::Nginx->new()->has(qw/http proxy ssi rewrite/)->plan(50)
 	->write_file_expand('nginx.conf', <<'EOF');
 
 %%TEST_GLOBALS%%
@@ -73,15 +73,7 @@ EOF
 	'set: <!--#echo var="x" -->');
 
 $t->run_daemon(\&http_daemon);
-
-eval {
-	open OLDERR, ">&", \*STDERR; close STDERR;
-	$t->run();
-	open STDERR, ">&", \*OLDERR;
-};
-plan(skip_all => 'no keepalive patches') if $@;
-
-$t->plan(50);
+$t->run();
 
 ###############################################################################