Mercurial > hg > nginx-tests
changeset 1066:23418577df58
Tests: tweak HTTP/2 GOAWAY test with no new stream after reload.
Wait for GOAWAY first before opening a stream.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Fri, 21 Oct 2016 15:27:44 +0300 |
parents | 2d4343a47c6d |
children | 4606a2ec3d7c |
files | h2.t |
diffstat | 1 files changed, 5 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/h2.t Thu Oct 20 18:52:37 2016 +0300 +++ b/h2.t Fri Oct 21 15:27:44 2016 +0300 @@ -1095,18 +1095,17 @@ hup('/pid', 8081, $t); +$frames = $s->read(all => [{ type => 'GOAWAY' }]); + +($frame) = grep { $_->{type} eq "GOAWAY" } @$frames; +is($frame->{last_sid}, $sid, 'GOAWAY with active stream - last sid'); + $sid2 = $s->new_stream(); $frames = $s->read(all => [{ sid => $sid2, fin => 0x4 }], wait => 0.5); ($frame) = grep { $_->{type} eq 'HEADERS' } @$frames; is($frame, undef, 'GOAWAY with active stream - no new stream'); -$frames = $s->read(all => [{ type => 'GOAWAY' }]) - unless grep { $_->{type} eq "GOAWAY" } @$frames; - -($frame) = grep { $_->{type} eq "GOAWAY" } @$frames; -is($frame->{last_sid}, $sid, 'GOAWAY with active stream - last sid'); - } $s->h2_window(100, $sid);