comparison h2_ssl.t @ 1788:78fe648d54a7

Tests: avoid send timeout in h2_ssl.t test with canceled streams. While being irrelevant to catching alerts, it slows down run time on systems with short socket buffers.
author Sergey Kandaurov <pluknet@nginx.com>
date Tue, 30 Aug 2022 17:24:16 +0400
parents 38bd7e75fe69
children cdcd75657e52
comparison
equal deleted inserted replaced
1787:e55aa7021ea5 1788:78fe648d54a7
9 9
10 use warnings; 10 use warnings;
11 use strict; 11 use strict;
12 12
13 use Test::More; 13 use Test::More;
14
15 use Socket qw/ SOL_SOCKET SO_RCVBUF /;
14 16
15 BEGIN { use FindBin; chdir($FindBin::Bin); } 17 BEGIN { use FindBin; chdir($FindBin::Bin); }
16 18
17 use lib 'lib'; 19 use lib 'lib';
18 use Test::Nginx; 20 use Test::Nginx;
119 121
120 # client cancels last stream after HEADERS has been created, 122 # client cancels last stream after HEADERS has been created,
121 # while some unsent data was left in the SSL buffer 123 # while some unsent data was left in the SSL buffer
122 # HEADERS frame may stuck in SSL buffer and won't be sent producing alert 124 # HEADERS frame may stuck in SSL buffer and won't be sent producing alert
123 125
126 $s = getconn(['http/1.1', 'h2']);
127 $s->{socket}->setsockopt(SOL_SOCKET, SO_RCVBUF, 1024*1024) or die $!;
124 $sid = $s->new_stream({ path => '/tbig.html' }); 128 $sid = $s->new_stream({ path => '/tbig.html' });
125 129
126 select undef, undef, undef, 0.2; 130 select undef, undef, undef, 0.2;
127 $s->h2_rst($sid, 8); 131 $s->h2_rst($sid, 8);
128 132