# HG changeset patch # User Sergey Kandaurov # Date 1594047670 -10800 # Node ID 9e142c0e34b2daeb59d2197a7f19f8b97103f306 # Parent 14eeaa39599db018d3fb00a84628654a42cfe255 Tests: allowed syslog messages arrival out-of-order. Reported by Dionna Amalie Glaze, see http://mailman.nginx.org/pipermail/nginx-devel/2020-June/013294.html diff --git a/syslog.t b/syslog.t --- a/syslog.t +++ b/syslog.t @@ -26,7 +26,7 @@ select STDOUT; $| = 1; plan(skip_all => 'win32') if $^O eq 'MSWin32'; -my $t = Test::Nginx->new()->has(qw/http limit_req/)->plan(61); +my $t = Test::Nginx->new()->has(qw/http limit_req/)->plan(62); $t->write_file_expand('nginx.conf', <<'EOF'); @@ -220,7 +220,8 @@ http_get('/if/work?logme=yes'); get_syslog('/a'); -like($t->read_file('s_if.log'), qr/good:404.*work:404/s, 'syslog if success'); +like($t->read_file('s_if.log'), qr/good:404/s, 'syslog if success'); +like($t->read_file('s_if.log'), qr/work:404/s, 'syslog if success 2'); unlike($t->read_file('s_if.log'), qr/(if:|empty:|zero:)404/, 'syslog if fail'); like(get_syslog('/nohostname'),