comparison h2.t @ 1185:368ab1d8ed8b

Tests: unbreak h2.t with aio. Postpone sending client's SETTINGS until after server exhausted stream window, so the expected result does not depend on the time when SETTINGS was applied.
author Sergey Kandaurov <pluknet@nginx.com>
date Tue, 06 Jun 2017 21:41:09 +0300
parents 89b4bdd1346a
children c99c1f43cb15
comparison
equal deleted inserted replaced
1184:89b4bdd1346a 1185:368ab1d8ed8b
891 $s = Test::Nginx::HTTP2->new(); 891 $s = Test::Nginx::HTTP2->new();
892 $s->h2_window(2**17); 892 $s->h2_window(2**17);
893 $s->h2_settings(0, 0x4 => 42); 893 $s->h2_settings(0, 0x4 => 42);
894 894
895 $sid = $s->new_stream({ path => '/frame_size/t1.html' }); 895 $sid = $s->new_stream({ path => '/frame_size/t1.html' });
896 $s->read(all => [{ sid => $sid, length => 42 }]);
896 897
897 $s->h2_settings(0, 0x4 => 2**17, 0x5 => 2**15); 898 $s->h2_settings(0, 0x4 => 2**17, 0x5 => 2**15);
898 899
899 $frames = $s->read(all => [{ sid => $sid, fin => 1 }]); 900 $frames = $s->read(all => [{ sid => $sid, fin => 1 }]);
900 @data = grep { $_->{type} eq "DATA" } @$frames; 901 @data = grep { $_->{type} eq "DATA" } @$frames;
901 $lengths = join ' ', map { $_->{length} } @data; 902 $lengths = join ' ', map { $_->{length} } @data;
902 is($lengths, '42 32768 32768 38', 'multiple SETTINGS'); 903 is($lengths, '32768 32768 38', 'multiple SETTINGS');
903 904
904 } 905 }
905 906
906 # stream multiplexing + WINDOW_UPDATE 907 # stream multiplexing + WINDOW_UPDATE
907 908