# HG changeset patch # User Sergey Kandaurov # Date 1612857116 -10800 # Node ID 48d8c16d48eac86c9795ea48b706c8a9a81355f9 # Parent 35beaf85de72a6219e1023cd4358d0a125a5a724 Tests: HTTP/2 connection timeout tests removed. Both http2_recv_timeout and http2_idle_timeout are scheduled for removal. diff --git a/h2.t b/h2.t --- a/h2.t +++ b/h2.t @@ -26,7 +26,7 @@ select STDERR; $| = 1; select STDOUT; $| = 1; my $t = Test::Nginx->new()->has(qw/http http_v2 proxy rewrite charset gzip/) - ->plan(150); + ->plan(144); $t->write_file_expand('nginx.conf', <<'EOF'); @@ -110,7 +110,6 @@ http { listen 127.0.0.1:8084 http2; server_name localhost; - http2_recv_timeout 1s; client_header_timeout 1s; send_timeout 1s; } @@ -119,7 +118,6 @@ http { listen 127.0.0.1:8085 http2; server_name localhost; - http2_idle_timeout 1s; client_body_timeout 1s; location /proxy2/ { @@ -244,40 +242,6 @@ is($frame->{value}, 'SEE-THIS', 'PING pa is($frame->{flags}, 1, 'PING flags ack'); is($frame->{sid}, 0, 'PING stream'); -# timeouts - -SKIP: { -skip 'long tests', 6 unless $ENV{TEST_NGINX_UNSAFE}; - -push my @s, Test::Nginx::HTTP2->new(port(8084), pure => 1); -push @s, Test::Nginx::HTTP2->new(port(8084), pure => 1); -$s[-1]->h2_ping('SEE-THIS'); -push @s, Test::Nginx::HTTP2->new(port(8085), pure => 1); -push @s, Test::Nginx::HTTP2->new(port(8085), pure => 1); -$s[-1]->h2_ping('SEE-THIS'); - -select undef, undef, undef, 2.1; - -$frames = (shift @s)->read(all => [{ type => "GOAWAY" }]); -($frame) = grep { $_->{type} eq "GOAWAY" } @$frames; -ok($frame, 'recv timeout - new connection GOAWAY'); -is($frame->{code}, 1, 'recv timeout - new connection code'); - -$frames = (shift @s)->read(all => [{ type => "GOAWAY" }]); -($frame) = grep { $_->{type} eq "GOAWAY" } @$frames; -is($frame, undef, 'recv timeout - idle connection GOAWAY'); - -$frames = (shift @s)->read(all => [{ type => "GOAWAY" }]); -($frame) = grep { $_->{type} eq "GOAWAY" } @$frames; -is($frame, undef, 'idle timeout - new connection GOAWAY'); - -$frames = (shift @s)->read(all => [{ type => "GOAWAY" }]); -($frame) = grep { $_->{type} eq "GOAWAY" } @$frames; -ok($frame, 'idle timeout - idle connection GOAWAY'); -is($frame->{code}, 0, 'idle timeout - idle connection code'); - -} - # GOAWAY Test::Nginx::HTTP2->new()->h2_goaway(0, 0, 5);