comparison h2_proxy_cache.t @ 1253:86e6287707ee

Tests: skip "no headers" test in h2_proxy_cache.t on win32. Small limit rate doesn't work on this platform which breaks test preconditions.
author Sergey Kandaurov <pluknet@nginx.com>
date Tue, 28 Nov 2017 14:55:54 +0300
parents 93453d7858ce
children fe886814b25a
comparison
equal deleted inserted replaced
1252:93453d7858ce 1253:86e6287707ee
155 $frames = $s->read(all => [{ sid => $sid, fin => 1 }]); 155 $frames = $s->read(all => [{ sid => $sid, fin => 1 }]);
156 push @$frames, $_ for @{$s->read(all => [{ sid => $sid }], wait => 0.2)}; 156 push @$frames, $_ for @{$s->read(all => [{ sid => $sid }], wait => 0.2)};
157 ok(!grep ({ $_->{type} eq "DATA" } @$frames), 157 ok(!grep ({ $_->{type} eq "DATA" } @$frames),
158 'proxy cache HEAD buffering off - no body'); 158 'proxy cache HEAD buffering off - no body');
159 159
160 SKIP: {
161 skip 'win32', 1 if $^O eq 'MSWin32';
162
160 # client cancels stream with a cacheable request that was sent to upstream 163 # client cancels stream with a cacheable request that was sent to upstream
161 # HEADERS should not be produced for the canceled stream 164 # HEADERS should not be produced for the canceled stream
162 165
163 $s = Test::Nginx::HTTP2->new(); 166 $s = Test::Nginx::HTTP2->new();
164 $sid = $s->new_stream({ path => '/cache/slow.html' }); 167 $sid = $s->new_stream({ path => '/cache/slow.html' });
165 168
166 $s->h2_rst($sid, 8); 169 $s->h2_rst($sid, 8);
167 170
168 $frames = $s->read(all => [{ sid => $sid, fin => 0x4 }], wait => 1.2); 171 $frames = $s->read(all => [{ sid => $sid, fin => 0x4 }], wait => 1.2);
169 ok(!(grep { $_->{type} eq "HEADERS" } @$frames), 'no headers'); 172 ok(!(grep { $_->{type} eq "HEADERS" } @$frames), 'no headers');
173
174 }
170 175
171 # client closes connection after sending a cacheable request producing alert 176 # client closes connection after sending a cacheable request producing alert
172 177
173 $s = Test::Nginx::HTTP2->new(); 178 $s = Test::Nginx::HTTP2->new();
174 $sid = $s->new_stream({ path => '/cache/t.html?4' }); 179 $sid = $s->new_stream({ path => '/cache/t.html?4' });