Mercurial > hg > nginx-tests
comparison h2.t @ 995:35739834ecd9
Tests: fixed HTTP/2 GOAWAY test for connection with active stream.
Read response data before quitting a worker as otherwise further data, such
as a GOAWAY frame, could not be written to the socket, notably on Solaris.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Tue, 26 Jul 2016 20:39:11 +0300 |
parents | eb49d29d5447 |
children | 3c5d3b384d3f |
comparison
equal
deleted
inserted
replaced
994:345a655ef643 | 995:35739834ecd9 |
---|---|
1096 | 1096 |
1097 $sid = $s->new_stream(); | 1097 $sid = $s->new_stream(); |
1098 $s->read(all => [{ sid => $sid, fin => 1 }]); | 1098 $s->read(all => [{ sid => $sid, fin => 1 }]); |
1099 | 1099 |
1100 my $active = Test::Nginx::HTTP2->new(port(8086)); | 1100 my $active = Test::Nginx::HTTP2->new(port(8086)); |
1101 $active->new_stream({ path => '/tbig.html' }); | 1101 $sid = $active->new_stream({ path => '/t1.html' }); |
1102 $active->read(all => [{ sid => $sid, length => 2**16 - 1 }]); | |
1102 | 1103 |
1103 $t->stop(); | 1104 $t->stop(); |
1104 | 1105 |
1105 $frames = $s->read(all => [{ type => 'GOAWAY' }]); | 1106 $frames = $s->read(all => [{ type => 'GOAWAY' }]); |
1106 ($frame) = grep { $_->{type} eq "GOAWAY" } @$frames; | 1107 ($frame) = grep { $_->{type} eq "GOAWAY" } @$frames; |