changeset 1092:f72f43eda2a6

Tests: simplified nginx reload in HTTP/2 GOAWAY tests.
author Sergey Kandaurov <pluknet@nginx.com>
date Mon, 12 Dec 2016 15:45:49 +0300
parents a5e428f4440d
children 2b0ef67ab032
files h2.t
diffstat 1 files changed, 1 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/h2.t
+++ b/h2.t
@@ -85,9 +85,6 @@ http {
             charset utf-8;
             return 200;
         }
-        location /pid {
-            return 200 "pid $pid";
-        }
     }
 
     server {
@@ -1072,7 +1069,7 @@ local $TODO = 'not yet' unless $t->has_v
 $sid = $s->new_stream({ path => '/t1.html' });
 $s->read(all => [{ sid => $sid, length => 2**16 - 1 }]);
 
-hup('/pid', 8081, $t);
+kill 'HUP', $t->read_file('nginx.pid');
 
 $frames = $s->read(all => [{ type => 'GOAWAY' }]);
 
@@ -1135,18 +1132,4 @@ sub gunzip_like {
 	}
 }
 
-sub hup {
-	my ($uri, $port, $t) = @_;
-
-	my $sock = sub { IO::Socket::INET->new('127.0.0.1:' . port(shift)) };
-	my ($pid) = http_get($uri, socket => $sock->($port)) =~ /pid (\d+)/;
-
-	kill 'HUP', $t->read_file('nginx.pid');
-
-	for (1 .. 20) {
-		last if http_get($uri, socket => $sock->($port)) !~ /pid $pid/;
-		select undef, undef, undef, 0.2;
-	}
-}
-
 ###############################################################################