comparison h2.t @ 1650:cdba06625d65

Tests: simplified testing configuration in h2.t. After removing HTTP/2 recv/idle timeout tests and further reshuffling, several server blocks can now be merged.
author Sergey Kandaurov <pluknet@nginx.com>
date Tue, 09 Feb 2021 14:24:34 +0300
parents 20e0ec3b4dec
children a78eedc39484
comparison
equal deleted inserted replaced
1649:20e0ec3b4dec 1650:cdba06625d65
105 105
106 http2_max_concurrent_streams 1; 106 http2_max_concurrent_streams 1;
107 } 107 }
108 108
109 server { 109 server {
110 listen 127.0.0.1:8084 http2;
111 server_name localhost;
112
113 client_header_timeout 1s;
114 }
115
116 server {
117 listen 127.0.0.1:8085 http2;
118 server_name localhost;
119
120 client_body_timeout 1s;
121
122 location /proxy2/ {
123 add_header X-Body $request_body;
124 proxy_pass http://127.0.0.1:8081/;
125 }
126 }
127
128 server {
129 listen 127.0.0.1:8086 http2; 110 listen 127.0.0.1:8086 http2;
130 server_name localhost; 111 server_name localhost;
131 112
132 send_timeout 1s; 113 send_timeout 1s;
133 } 114 }
136 listen 127.0.0.1:8087 http2; 117 listen 127.0.0.1:8087 http2;
137 server_name localhost; 118 server_name localhost;
138 119
139 client_header_timeout 1s; 120 client_header_timeout 1s;
140 client_body_timeout 1s; 121 client_body_timeout 1s;
122
123 location / { }
141 124
142 location /proxy/ { 125 location /proxy/ {
143 proxy_pass http://127.0.0.1:8081/; 126 proxy_pass http://127.0.0.1:8081/;
144 } 127 }
145 } 128 }
1110 ($frame) = grep { $_->{type} eq "PING" } @$frames; 1093 ($frame) = grep { $_->{type} eq "PING" } @$frames;
1111 is($frame->{value}, 'SEE-THIS', 'unknown frame type'); 1094 is($frame->{value}, 'SEE-THIS', 'unknown frame type');
1112 1095
1113 # graceful shutdown with stream waiting on HEADERS payload 1096 # graceful shutdown with stream waiting on HEADERS payload
1114 1097
1115 my $grace = Test::Nginx::HTTP2->new(port(8084)); 1098 my $grace = Test::Nginx::HTTP2->new(port(8087));
1116 $grace->new_stream({ split => [ 9 ], abort => 1 }); 1099 $grace->new_stream({ split => [ 9 ], abort => 1 });
1117 1100
1118 # graceful shutdown waiting on incomplete request body DATA frames 1101 # graceful shutdown waiting on incomplete request body DATA frames
1119 1102
1120 my $grace3 = Test::Nginx::HTTP2->new(port(8085)); 1103 my $grace3 = Test::Nginx::HTTP2->new(port(8087));
1121 $sid = $grace3->new_stream({ path => '/proxy2/t2.html', body_more => 1 }); 1104 $sid = $grace3->new_stream({ path => '/proxy/t2.html', body_more => 1 });
1122 $grace3->h2_body('TEST', { body_more => 1 }); 1105 $grace3->h2_body('TEST', { body_more => 1 });
1123 1106
1124 # GOAWAY without awaiting active streams, further streams ignored 1107 # GOAWAY without awaiting active streams, further streams ignored
1125 1108
1126 $s = Test::Nginx::HTTP2->new(port(8080)); 1109 $s = Test::Nginx::HTTP2->new(port(8080));