Skip to content

Commit 6521b46

Browse files
committed
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.
1 parent 088ba08 commit 6521b46

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

h2_ssl.t

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ use strict;
1212

1313
use Test::More;
1414

15+
use Socket qw/ SOL_SOCKET SO_RCVBUF /;
16+
1517
BEGIN { use FindBin; chdir($FindBin::Bin); }
1618

1719
use lib 'lib';
@@ -121,6 +123,8 @@ is($frame->{headers}->{':status'}, 200, 'alpn to HTTP/2');
121123
# while some unsent data was left in the SSL buffer
122124
# HEADERS frame may stuck in SSL buffer and won't be sent producing alert
123125

126+
$s = getconn(['http/1.1', 'h2']);
127+
$s->{socket}->setsockopt(SOL_SOCKET, SO_RCVBUF, 1024*1024) or die $!;
124128
$sid = $s->new_stream({ path => '/tbig.html' });
125129

126130
select undef, undef, undef, 0.2;

0 commit comments

Comments
 (0)