changeset 661:c99c30afc1c9

Tests: one more test for http2_max_concurrent_streams. Ensure that the directive limits only active streams.
author Sergey Kandaurov <pluknet@nginx.com>
date Mon, 24 Aug 2015 19:45:41 +0300
parents b0342dbd9390
children 07de3d202eb7
files h2.t
diffstat 1 files changed, 10 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/h2.t
+++ b/h2.t
@@ -32,7 +32,7 @@ plan(skip_all => 'IO::Socket::SSL too ol
 
 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(152);
+	->has_daemon('openssl')->plan(153);
 
 $t->write_file_expand('nginx.conf', <<'EOF');
 
@@ -1339,6 +1339,15 @@ is($frame->{headers}->{':status'}, 200, 
 ($frame) = grep { $_->{type} eq "HEADERS" && $_->{sid} == $sid2 } @$frames;
 isnt($frame->{headers}->{':status'}, 200, 'http2_max_concurrent_streams 2');
 
+h2_window($sess, 2**16, $sid);
+h2_read($sess, all => [{ sid => $sid, fin => 1 }]);
+
+$sid = new_stream($sess, { path => '/t2.html' });
+$frames = h2_read($sess, all => [{ sid => $sid, fin => 1 }]);
+
+($frame) = grep { $_->{type} eq "HEADERS" && $_->{sid} == $sid } @$frames;
+is($frame->{headers}->{':status'}, 200, 'http2_max_concurrent_streams 3');
+
 
 # some invalid cases below