diff h2_cache.t @ 945:d73bef563aea

Tests: speed up HTTP/2 tests.
author Sergey Kandaurov <pluknet@nginx.com>
date Wed, 15 Jun 2016 13:27:56 +0300
parents 3ac4036b139d
children 4dc302d8e04f
line wrap: on
line diff
--- a/h2_cache.t
+++ b/h2_cache.t
@@ -114,8 +114,8 @@ ok($frame, 'proxy cache - request body -
 $sess = new_session();
 $sid = new_stream($sess, { path => '/cache/t.html?1', method => 'HEAD' });
 
-$frames = h2_read($sess, all => [{ sid => $sid, fin => 1 }]);
-push @$frames, $_ for @{h2_read($sess, all => [{ sid => $sid }])};
+$frames = h2_read($sess, all => [{ sid => $sid, fin => 1 }], wait => 0.2);
+push @$frames, $_ for @{h2_read($sess, all => [{ sid => $sid }], wait => 0.2)};
 ok(!grep ({ $_->{type} eq "DATA" } @$frames), 'proxy cache HEAD - no body');
 
 # proxy cache - expect no stray empty DATA frame
@@ -141,7 +141,7 @@ is(join(' ', map { $_->{flags} } @data),
 	{ path => '/proxy_buffering_off/t.html?1', method => 'HEAD' });
 
 $frames = h2_read($sess, all => [{ sid => $sid, fin => 1 }]);
-push @$frames, $_ for @{h2_read($sess, all => [{ sid => $sid }])};
+push @$frames, $_ for @{h2_read($sess, all => [{ sid => $sid }], wait => 0.2)};
 ok(!grep ({ $_->{type} eq "DATA" } @$frames),
 	'proxy cache HEAD buffering off - no body');