Mercurial > hg > nginx-tests
comparison h2_limit_conn.t @ 945:d73bef563aea
Tests: speed up HTTP/2 tests.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Wed, 15 Jun 2016 13:27:56 +0300 |
parents | 724fcee9a355 |
children | 4dc302d8e04f |
comparison
equal
deleted
inserted
replaced
944:235f796c2861 | 945:d73bef563aea |
---|---|
63 | 63 |
64 my ($frame) = grep { $_->{type} eq "HEADERS" && $_->{sid} == $sid } @$frames; | 64 my ($frame) = grep { $_->{type} eq "HEADERS" && $_->{sid} == $sid } @$frames; |
65 is($frame->{headers}->{':status'}, 200, 'limit_conn first stream'); | 65 is($frame->{headers}->{':status'}, 200, 'limit_conn first stream'); |
66 | 66 |
67 my $sid2 = new_stream($sess, { path => '/t.html' }); | 67 my $sid2 = new_stream($sess, { path => '/t.html' }); |
68 $frames = h2_read($sess, all => [{ sid => $sid2, fin => 0 }]); | 68 $frames = h2_read($sess, all => [{ sid => $sid2, length => 1 }]); |
69 | 69 |
70 ($frame) = grep { $_->{type} eq "HEADERS" && $_->{sid} == $sid2 } @$frames; | 70 ($frame) = grep { $_->{type} eq "HEADERS" && $_->{sid} == $sid2 } @$frames; |
71 is($frame->{headers}->{':status'}, 503, 'limit_conn rejected'); | 71 is($frame->{headers}->{':status'}, 503, 'limit_conn rejected'); |
72 | 72 |
73 h2_settings($sess, 0, 0x4 => 2**16); | 73 h2_settings($sess, 0, 0x4 => 2**16); |
88 | 88 |
89 ($frame) = grep { $_->{type} eq "HEADERS" && $_->{sid} == $sid } @$frames; | 89 ($frame) = grep { $_->{type} eq "HEADERS" && $_->{sid} == $sid } @$frames; |
90 is($frame->{headers}->{':status'}, 200, 'RST_STREAM 1'); | 90 is($frame->{headers}->{':status'}, 200, 'RST_STREAM 1'); |
91 | 91 |
92 $sid2 = new_stream($sess, { path => '/t.html' }); | 92 $sid2 = new_stream($sess, { path => '/t.html' }); |
93 $frames = h2_read($sess, all => [{ sid => $sid2, fin => 0 }]); | 93 $frames = h2_read($sess, all => [{ sid => $sid2, length => 1 }]); |
94 | 94 |
95 ($frame) = grep { $_->{type} eq "HEADERS" && $_->{sid} == $sid2 } @$frames; | 95 ($frame) = grep { $_->{type} eq "HEADERS" && $_->{sid} == $sid2 } @$frames; |
96 is($frame->{headers}->{':status'}, 200, 'RST_STREAM 2'); | 96 is($frame->{headers}->{':status'}, 200, 'RST_STREAM 2'); |
97 | 97 |
98 ############################################################################### | 98 ############################################################################### |