diff h2_keepalive.t @ 1900:236d038dc04a

Tests: suppress "listen .. http2;" deprecation warnings.
author Sergey Kandaurov <pluknet@nginx.com>
date Wed, 31 May 2023 13:29:34 +0400
parents 3366128e526b
children
line wrap: on
line diff
--- a/h2_keepalive.t
+++ b/h2_keepalive.t
@@ -25,7 +25,7 @@ use Test::Nginx::HTTP2;
 select STDERR; $| = 1;
 select STDOUT; $| = 1;
 
-my $t = Test::Nginx->new()->has(qw/http http_v2/)
+my $t = Test::Nginx->new()->has(qw/http http_v2/)->plan(19)
 	->write_file_expand('nginx.conf', <<'EOF');
 
 %%TEST_GLOBALS%%
@@ -73,7 +73,11 @@ EOF
 $t->write_file('index.html', 'SEE-THAT' x 50000);
 $t->write_file('t.html', 'SEE-THAT');
 
-$t->run()->plan(19);
+# suppress deprecation warning
+
+open OLDERR, ">&", \*STDERR; close STDERR;
+$t->run();
+open STDERR, ">&", \*OLDERR;
 
 ###############################################################################