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
+++ b/h2.t
@@ -1095,18 +1095,17 @@ local $TODO = 'not yet' unless $t->has_v
 
 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);