comparison h2_error_page.t @ 1987:a095b971fbcc

Tests: removed TODO and try_run() checks for legacy versions. For h2_http2.t, try_run() is preserved to ensure that deprecation warnings for "listen ... http2" are suppressed, yet plan() is reported before try_run(), so failure to start will be properly reported.
author Maxim Dounin <mdounin@mdounin.ru>
date Tue, 04 Jun 2024 18:38:01 +0300
parents 11463d379570
children
comparison
equal deleted inserted replaced
1986:11463d379570 1987:a095b971fbcc
83 83
84 my $s2 = Test::Nginx::HTTP2->new(); 84 my $s2 = Test::Nginx::HTTP2->new();
85 $sid = $s2->new_stream({ method => 'foo' }); 85 $sid = $s2->new_stream({ method => 'foo' });
86 $frames = $s2->read(all => [{ type => 'RST_STREAM' }]); 86 $frames = $s2->read(all => [{ type => 'RST_STREAM' }]);
87 87
88 TODO: {
89 local $TODO = 'not yet' unless $t->has_version('1.23.4');
90
91 ($frame) = grep { $_->{type} eq "RST_STREAM" } @$frames; 88 ($frame) = grep { $_->{type} eq "RST_STREAM" } @$frames;
92 is($frame->{sid}, $sid, 'error 400 return 444 - invalid header'); 89 is($frame->{sid}, $sid, 'error 400 return 444 - invalid header');
93
94 }
95 90
96 # while keeping $s1 and $s2, stop nginx; this should result in 91 # while keeping $s1 and $s2, stop nginx; this should result in
97 # "open socket ... left in connection ..." alerts if any of these 92 # "open socket ... left in connection ..." alerts if any of these
98 # sockets are still open 93 # sockets are still open
99 94
100 $t->stop(); 95 $t->stop();
101 $t->todo_alerts() unless $t->has_version('1.23.4');
102 96
103 ############################################################################### 97 ###############################################################################