# HG changeset patch # User Sergey Kandaurov # Date 1626786773 -10800 # Node ID efc502e696b0a79d528c264460401093d8352239 # Parent 53a801bf4d0bb50f56c236534d0b13a9eba13622 Tests: h2_limit_req.t cleanup. The checks were used prior to introducing the request body preread buffer. diff --git a/h2_limit_req.t b/h2_limit_req.t --- a/h2_limit_req.t +++ b/h2_limit_req.t @@ -104,11 +104,6 @@ is($frame->{headers}->{':status'}, 200, # predict send windows $sid = $s->new_stream(); -my ($maxwin) = sort {$a <=> $b} $s->{streams}{$sid}, $s->{conn_window}; - -SKIP: { -skip 'not enough window', 1 if $maxwin < 5; - $s = Test::Nginx::HTTP2->new(); $sid = $s->new_stream({ path => '/proxy_limit_req/', body => 'TEST2' }); select undef, undef, undef, 1.1; @@ -118,16 +113,10 @@ select undef, undef, undef, 1.1; is(read_body_file($frame->{headers}->{'x-body-file'}), 'TEST2', 'request body - limit req 2'); -} - # partial request body data frame received (to be discarded) within request # delayed in limit_req, the rest of data frame is received after response $s = Test::Nginx::HTTP2->new(); - -SKIP: { -skip 'not enough window', 1 if $maxwin < 4; - $sid = $s->new_stream({ path => '/limit_req', body => 'TEST', split => [61], split_delay => 1.1 }); $frames = $s->read(all => [{ sid => $sid, fin => 1 }]); @@ -135,8 +124,6 @@ skip 'not enough window', 1 if $maxwin < ($frame) = grep { $_->{type} eq "HEADERS" } @$frames; is($frame->{headers}->{':status'}, '200', 'discard body - limit req - limited'); -} - $sid = $s->new_stream({ path => '/' }); $frames = $s->read(all => [{ sid => $sid, fin => 1 }]); @@ -146,9 +133,6 @@ is($frame->{headers}->{':status'}, '200' # ditto, but instead of receiving the rest of data frame, connection is closed # 'http request already closed while closing request' alert can be produced -SKIP: { -skip 'not enough window', 1 if $maxwin < 4; - $s = Test::Nginx::HTTP2->new(); $sid = $s->new_stream({ path => '/limit_req', body => 'TEST', split => [61], abort => 1 }); @@ -158,8 +142,6 @@ close $s->{socket}; pass('discard body - limit req - eof'); -} - ############################################################################### sub read_body_file {