Mercurial > hg > nginx-tests
comparison h2.t @ 1651:a78eedc39484
Tests: h2.t tests speedup.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Wed, 10 Feb 2021 15:12:56 +0300 |
parents | cdba06625d65 |
children | 29f0e926c15f |
comparison
equal
deleted
inserted
replaced
1650:cdba06625d65 | 1651:a78eedc39484 |
---|---|
109 server { | 109 server { |
110 listen 127.0.0.1:8086 http2; | 110 listen 127.0.0.1:8086 http2; |
111 server_name localhost; | 111 server_name localhost; |
112 | 112 |
113 send_timeout 1s; | 113 send_timeout 1s; |
114 lingering_close off; | |
114 } | 115 } |
115 | 116 |
116 server { | 117 server { |
117 listen 127.0.0.1:8087 http2; | 118 listen 127.0.0.1:8087 http2; |
118 server_name localhost; | 119 server_name localhost; |
119 | 120 |
120 client_header_timeout 1s; | 121 client_header_timeout 1s; |
121 client_body_timeout 1s; | 122 client_body_timeout 1s; |
123 lingering_close off; | |
122 | 124 |
123 location / { } | 125 location / { } |
124 | 126 |
125 location /proxy/ { | 127 location /proxy/ { |
126 proxy_pass http://127.0.0.1:8081/; | 128 proxy_pass http://127.0.0.1:8081/; |
1131 $sum = eval join '+', map { $_->{length} } @data; | 1133 $sum = eval join '+', map { $_->{length} } @data; |
1132 is($sum, 81, 'GOAWAY with active stream - active stream DATA after GOAWAY'); | 1134 is($sum, 81, 'GOAWAY with active stream - active stream DATA after GOAWAY'); |
1133 | 1135 |
1134 # GOAWAY - force closing a connection by server with idle or active streams | 1136 # GOAWAY - force closing a connection by server with idle or active streams |
1135 | 1137 |
1136 $s = Test::Nginx::HTTP2->new(); | 1138 $s = Test::Nginx::HTTP2->new(port(8086)); |
1137 $sid = $s->new_stream(); | 1139 $sid = $s->new_stream(); |
1138 $s->read(all => [{ sid => $sid, fin => 1 }]); | 1140 $s->read(all => [{ sid => $sid, fin => 1 }]); |
1139 | 1141 |
1140 my $active = Test::Nginx::HTTP2->new(port(8086)); | 1142 my $active = Test::Nginx::HTTP2->new(port(8086)); |
1141 $sid = $active->new_stream({ path => '/t1.html' }); | 1143 $sid = $active->new_stream({ path => '/t1.html' }); |