Mercurial > hg > nginx-tests
changeset 672:66f94d6c5047
Tests: more HTTP/2 error handling tests.
Make sure that, besides GOAWAY, connection is closed on a connection error.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Wed, 02 Sep 2015 17:37:48 +0300 |
parents | 0c70eb166a3a |
children | 9d6c865c2869 |
files | h2.t |
diffstat | 1 files changed, 7 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/h2.t Wed Sep 02 13:57:46 2015 +0300 +++ b/h2.t Wed Sep 02 17:37:48 2015 +0300 @@ -32,7 +32,7 @@ my $t = Test::Nginx->new()->has(qw/http http_ssl http_v2 proxy cache/) ->has(qw/limit_conn rewrite realip shmem/) - ->has_daemon('openssl')->plan(159); + ->has_daemon('openssl')->plan(161); $t->write_file_expand('nginx.conf', <<'EOF'); @@ -496,7 +496,7 @@ $frames = h2_read($sess, all => [{ sid => $sid, fin => 1 }]); ($frame) = grep { $_->{type} eq "HEADERS" } @$frames; -is($frame, undef, 'updated table size - invalid index'); +is($frame, undef, 'invalid index'); # 5.4.1. Connection Error Handling # An endpoint that encounters a connection error SHOULD first send a @@ -506,10 +506,14 @@ local $TODO = 'not yet'; ($frame) = grep { $_->{type} eq "GOAWAY" } @$frames; -ok($frame, 'updated table size - invalid index GOAWAY'); +ok($frame, 'invalid index - GOAWAY'); } +h2_ping($sess, 'SEE-THIS'); +is(@{h2_read($sess, all => [{ type => 'PING' }])}, 0, 'invalid index - PING'); +is($sess->{socket}->connected, undef, 'invalid index - connection close'); + # HEAD $sess = new_session();