Skip to content

Commit 34ee979

Browse files
committed
fixed the flush-timeout test script.
1 parent bd1da87 commit 34ee979

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

t/057-flush-timeout.t

+14-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
11
# vim:set ft= ts=4 sw=4 et fdm=marker:
2+
3+
BEGIN {
4+
if (!defined $ENV{LD_PRELOAD}) {
5+
$ENV{LD_PRELOAD} = '';
6+
}
7+
8+
if ($ENV{LD_PRELOAD} !~ /\bmockeagain\.so\b/) {
9+
$ENV{LD_PRELOAD} = "mockeagain.so $ENV{LD_PRELOAD}";
10+
$ENV{TEST_NGINX_EVENT_TYPE} = 'poll';
11+
}
12+
13+
$ENV{MOCKEAGAIN_WRITE_TIMEOUT_PATTERN} = 'hello, world';
14+
}
15+
216
use lib 'lib';
317
use Test::Nginx::Socket;
418

@@ -12,11 +26,6 @@ repeat_each(2);
1226

1327
plan tests => repeat_each() * (blocks() * 1);
1428

15-
if ($ENV{LD_PRELOAD} !~ /\bmockeagain\.so\b/) {
16-
$ENV{LD_PRELOAD} = "mockeagain.so $ENV{LD_PRELOAD}";
17-
}
18-
19-
$ENV{MOCKEAGAIN_WRITE_TIMEOUT_PATTERN} = 'hello, world';
2029
#no_diff();
2130
#no_long_string();
2231
run_tests();

0 commit comments

Comments
 (0)