Skip to content

Commit 018460f

Browse files
committed
Tests: suppress "listen .. http2;" deprecation warnings.
1 parent 1346652 commit 018460f

32 files changed

+161
-17
lines changed

grpc.t

+4
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,11 @@ http {
9090
9191
EOF
9292

93+
# suppress deprecation warning
94+
95+
open OLDERR, ">&", \*STDERR; close STDERR;
9396
$t->run();
97+
open STDERR, ">&", \*OLDERR;
9498

9599
###############################################################################
96100

grpc_next_upstream.t

+4
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,11 @@ http {
106106
107107
EOF
108108

109+
# suppress deprecation warning
110+
111+
open OLDERR, ">&", \*STDERR; close STDERR;
109112
$t->run();
113+
open STDERR, ">&", \*OLDERR;
110114

111115
###############################################################################
112116

grpc_pass.t

+5
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,12 @@ foreach my $name ('localhost') {
9797
}
9898

9999
$t->run_daemon(\&dns_daemon, port(8982), $t);
100+
101+
# suppress deprecation warning
102+
103+
open OLDERR, ">&", \*STDERR; close STDERR;
100104
$t->run()->plan(5);
105+
open STDERR, ">&", \*OLDERR;
101106

102107
$t->waitforfile($t->testdir . '/' . port(8982));
103108

grpc_request_buffering.t

+4
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,11 @@ http {
6464
6565
EOF
6666

67+
# suppress deprecation warning
68+
69+
open OLDERR, ">&", \*STDERR; close STDERR;
6770
$t->run();
71+
open STDERR, ">&", \*OLDERR;
6872

6973
###############################################################################
7074

grpc_ssl.t

+4
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,11 @@ sleep 1 if $^O eq 'MSWin32';
128128

129129
$t->write_file('password', 'client');
130130

131+
# suppress deprecation warning
132+
133+
open OLDERR, ">&", \*STDERR; close STDERR;
131134
$t->run();
135+
open STDERR, ">&", \*OLDERR;
132136

133137
###############################################################################
134138

h2.t

+4
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,11 @@ http {
132132
133133
EOF
134134

135+
# suppress deprecation warning
136+
137+
open OLDERR, ">&", \*STDERR; close STDERR;
135138
$t->run();
139+
open STDERR, ">&", \*OLDERR;
136140

137141
# file size is slightly beyond initial window size: 2**16 + 80 bytes
138142

h2_absolute_redirect.t

+4
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,11 @@ EOF
107107
mkdir($t->testdir() . '/dir');
108108
mkdir($t->testdir() . '/dir sp');
109109

110+
# suppress deprecation warning
111+
112+
open OLDERR, ">&", \*STDERR; close STDERR;
110113
$t->run()->plan(23);
114+
open STDERR, ">&", \*OLDERR;
111115

112116
###############################################################################
113117

h2_auth_request.t

+4
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,11 @@ http {
6666
6767
EOF
6868

69+
# suppress deprecation warning
70+
71+
open OLDERR, ">&", \*STDERR; close STDERR;
6972
$t->run();
73+
open STDERR, ">&", \*OLDERR;
7074

7175
###############################################################################
7276

h2_error_page.t

+4
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,11 @@ http {
5454
5555
EOF
5656

57+
# suppress deprecation warning
58+
59+
open OLDERR, ">&", \*STDERR; close STDERR;
5760
$t->run();
61+
open STDERR, ">&", \*OLDERR;
5862

5963
###############################################################################
6064

h2_fastcgi_request_buffering.t

+5-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ use Test::Nginx::HTTP2;
2323
select STDERR; $| = 1;
2424
select STDOUT; $| = 1;
2525

26-
my $t = Test::Nginx->new()->has(qw/http http_v2 fastcgi/);
26+
my $t = Test::Nginx->new()->has(qw/http http_v2 fastcgi/)->plan(48);
2727

2828
$t->write_file_expand('nginx.conf', <<'EOF');
2929
@@ -52,8 +52,11 @@ http {
5252
5353
EOF
5454

55+
# suppress deprecation warning
56+
57+
open OLDERR, ">&", \*STDERR; close STDERR;
5558
$t->run();
56-
$t->plan(48);
59+
open STDERR, ">&", \*OLDERR;
5760

5861
###############################################################################
5962

h2_headers.t

+8-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,14 @@ http {
122122
EOF
123123

124124
$t->run_daemon(\&http_daemon);
125-
$t->run()->waitforsocket('127.0.0.1:' . port(8083));
125+
126+
# suppress deprecation warning
127+
128+
open OLDERR, ">&", \*STDERR; close STDERR;
129+
$t->run();
130+
open STDERR, ">&", \*OLDERR;
131+
132+
$t->waitforsocket('127.0.0.1:' . port(8083));
126133

127134
# file size is slightly beyond initial window size: 2**16 + 80 bytes
128135

h2_keepalive.t

+6-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ use Test::Nginx::HTTP2;
2525
select STDERR; $| = 1;
2626
select STDOUT; $| = 1;
2727

28-
my $t = Test::Nginx->new()->has(qw/http http_v2/)
28+
my $t = Test::Nginx->new()->has(qw/http http_v2/)->plan(19)
2929
->write_file_expand('nginx.conf', <<'EOF');
3030
3131
%%TEST_GLOBALS%%
@@ -73,7 +73,11 @@ EOF
7373
$t->write_file('index.html', 'SEE-THAT' x 50000);
7474
$t->write_file('t.html', 'SEE-THAT');
7575

76-
$t->run()->plan(19);
76+
# suppress deprecation warning
77+
78+
open OLDERR, ">&", \*STDERR; close STDERR;
79+
$t->run();
80+
open STDERR, ">&", \*OLDERR;
7781

7882
###############################################################################
7983

h2_limit_conn.t

+5
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,12 @@ http {
5151
EOF
5252

5353
$t->write_file('t.html', 'SEE-THIS');
54+
55+
# suppress deprecation warning
56+
57+
open OLDERR, ">&", \*STDERR; close STDERR;
5458
$t->run();
59+
open STDERR, ">&", \*OLDERR;
5560

5661
###############################################################################
5762

h2_limit_req.t

+5
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,12 @@ EOF
6464

6565
$t->write_file('index.html', '');
6666
$t->write_file('t.html', 'SEE-THIS');
67+
68+
# suppress deprecation warning
69+
70+
open OLDERR, ">&", \*STDERR; close STDERR;
6771
$t->run();
72+
open STDERR, ">&", \*OLDERR;
6873

6974
###############################################################################
7075

h2_priority.t

+4
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,11 @@ http {
4444
4545
EOF
4646

47+
# suppress deprecation warning
48+
49+
open OLDERR, ">&", \*STDERR; close STDERR;
4750
$t->run();
51+
open STDERR, ">&", \*OLDERR;
4852

4953
# file size is slightly beyond initial window size: 2**16 + 80 bytes
5054

h2_proxy_cache.t

+5
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,12 @@ EOF
6868

6969
$t->write_file('t.html', 'SEE-THIS');
7070
$t->write_file('slow.html', 'SEE-THIS');
71+
72+
# suppress deprecation warning
73+
74+
open OLDERR, ">&", \*STDERR; close STDERR;
7175
$t->run();
76+
open STDERR, ">&", \*OLDERR;
7277

7378
###############################################################################
7479

h2_proxy_max_temp_file_size.t

+5
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,12 @@ http {
6666
EOF
6767

6868
$t->write_file('1', 'X' x (1024 * 1024));
69+
70+
# suppress deprecation warning
71+
72+
open OLDERR, ">&", \*STDERR; close STDERR;
6973
$t->run();
74+
open STDERR, ">&", \*OLDERR;
7075

7176
###############################################################################
7277

h2_proxy_protocol.t

+5
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,12 @@ http {
5454
EOF
5555

5656
$t->write_file('t.html', 'SEE-THIS');
57+
58+
# suppress deprecation warning
59+
60+
open OLDERR, ">&", \*STDERR; close STDERR;
5761
$t->run();
62+
open STDERR, ">&", \*OLDERR;
5863

5964
###############################################################################
6065

h2_proxy_request_buffering.t

+5-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ use Test::Nginx::HTTP2;
2525
select STDERR; $| = 1;
2626
select STDOUT; $| = 1;
2727

28-
my $t = Test::Nginx->new()->has(qw/http http_v2 proxy/);
28+
my $t = Test::Nginx->new()->has(qw/http http_v2 proxy/)->plan(49);
2929

3030
$t->write_file_expand('nginx.conf', <<'EOF');
3131
@@ -65,8 +65,11 @@ http {
6565
6666
EOF
6767

68+
# suppress deprecation warning
69+
70+
open OLDERR, ">&", \*STDERR; close STDERR;
6871
$t->run();
69-
$t->plan(49);
72+
open STDERR, ">&", \*OLDERR;
7073

7174
###############################################################################
7275

h2_proxy_request_buffering_redirect.t

+7-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ select STDOUT; $| = 1;
2525

2626
my $t = Test::Nginx->new()->has(qw/http http_v2 proxy rewrite/)->plan(1);
2727

28-
$t->write_file_expand('nginx.conf', <<'EOF')->run();
28+
$t->write_file_expand('nginx.conf', <<'EOF');
2929
3030
%%TEST_GLOBALS%%
3131
@@ -68,6 +68,12 @@ http {
6868
6969
EOF
7070

71+
# suppress deprecation warning
72+
73+
open OLDERR, ">&", \*STDERR; close STDERR;
74+
$t->run();
75+
open STDERR, ">&", \*OLDERR;
76+
7177
###############################################################################
7278

7379
# unbuffered request body

h2_proxy_request_buffering_ssl.t

+5-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ select STDERR; $| = 1;
2626
select STDOUT; $| = 1;
2727

2828
my $t = Test::Nginx->new()->has(qw/http http_ssl http_v2 proxy/)
29-
->has_daemon('openssl');
29+
->has_daemon('openssl')->plan(40);
3030

3131
$t->write_file_expand('nginx.conf', <<'EOF');
3232
@@ -98,8 +98,11 @@ foreach my $name ('localhost') {
9898
or die "Can't create certificate for $name: $!\n";
9999
}
100100

101+
# suppress deprecation warning
102+
103+
open OLDERR, ">&", \*STDERR; close STDERR;
101104
$t->run();
102-
$t->plan(40);
105+
open STDERR, ">&", \*OLDERR;
103106

104107
###############################################################################
105108

h2_proxy_ssl.t

+5
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,12 @@ foreach my $name ('localhost') {
7474
}
7575

7676
$t->write_file('index.html', '');
77+
78+
# suppress deprecation warning
79+
80+
open OLDERR, ">&", \*STDERR; close STDERR;
7781
$t->run();
82+
open STDERR, ">&", \*OLDERR;
7883

7984
###############################################################################
8085

h2_request_body.t

+5
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,12 @@ EOF
7777
$t->write_file('index.html', '');
7878
$t->write_file('t.html', 'SEE-THIS');
7979
$t->write_file('slow.html', 'SEE-THIS');
80+
81+
# suppress deprecation warning
82+
83+
open OLDERR, ">&", \*STDERR; close STDERR;
8084
$t->run();
85+
open STDERR, ">&", \*OLDERR;
8186

8287
###############################################################################
8388

h2_request_body_extra.t

+4
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,11 @@ EOF
9090
plan(skip_all => 'not yet') unless $t->has_version('1.21.2');
9191
$t->plan(50);
9292

93+
# suppress deprecation warning
94+
95+
open OLDERR, ">&", \*STDERR; close STDERR;
9396
$t->run();
97+
open STDERR, ">&", \*OLDERR;
9498

9599
###############################################################################
96100

h2_request_body_preread.t

+7-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ use Test::Nginx::HTTP2;
2323
select STDERR; $| = 1;
2424
select STDOUT; $| = 1;
2525

26-
my $t = Test::Nginx->new()->has(qw/http http_v2 proxy limit_req/);
26+
my $t = Test::Nginx->new()->has(qw/http http_v2 proxy limit_req/)->plan(9);
2727

2828
$t->write_file_expand('nginx.conf', <<'EOF');
2929
@@ -89,7 +89,12 @@ http {
8989
EOF
9090

9191
$t->write_file('t', '');
92-
$t->run()->plan(9);
92+
93+
# suppress deprecation warning
94+
95+
open OLDERR, ">&", \*STDERR; close STDERR;
96+
$t->run();
97+
open STDERR, ">&", \*OLDERR;
9398

9499
###############################################################################
95100

h2_server_push.t

+4
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,11 @@ $t->write_file('t1', join('', map { sprintf "X%04dXXX", $_ } (1 .. 8202)));
139139
$t->write_file('t2', 'SEE-THIS');
140140
$t->write_file('explf', join('', map { sprintf "X%06dXXX", $_ } (1 .. 6553)));
141141

142+
# suppress deprecation warning
143+
144+
open OLDERR, ">&", \*STDERR; close STDERR;
142145
$t->run();
146+
open STDERR, ">&", \*OLDERR;
143147

144148
###############################################################################
145149

0 commit comments

Comments
 (0)