Mercurial > hg > nginx-tests
comparison memcached_keepalive_stale.t @ 593:6c0a5903d0ae
Tests: cleanup now duplicating tests for no alerts.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Wed, 27 May 2015 17:09:22 +0300 |
parents | c0b4ae82fd9d |
children | e9064d691790 |
comparison
equal
deleted
inserted
replaced
592:355f2d5ff60f | 593:6c0a5903d0ae |
---|---|
23 | 23 |
24 eval { require Cache::Memcached; }; | 24 eval { require Cache::Memcached; }; |
25 plan(skip_all => 'Cache::Memcached not installed') if $@; | 25 plan(skip_all => 'Cache::Memcached not installed') if $@; |
26 | 26 |
27 my $t = Test::Nginx->new()->has(qw/http memcached upstream_keepalive rewrite/) | 27 my $t = Test::Nginx->new()->has(qw/http memcached upstream_keepalive rewrite/) |
28 ->has_daemon('memcached')->plan(2) | 28 ->has_daemon('memcached')->plan(1) |
29 ->write_file_expand('nginx.conf', <<'EOF'); | 29 ->write_file_expand('nginx.conf', <<'EOF'); |
30 | 30 |
31 %%TEST_GLOBALS%% | 31 %%TEST_GLOBALS%% |
32 | 32 |
33 daemon off; | 33 daemon off; |
116 } | 116 } |
117 | 117 |
118 cmp_ok($memd1->stats()->{total}->{total_connections}, '<=', $total + 2, | 118 cmp_ok($memd1->stats()->{total}->{total_connections}, '<=', $total + 2, |
119 'only one connection per worker used'); | 119 'only one connection per worker used'); |
120 | 120 |
121 $t->stop(); | |
122 | |
123 like(`grep -F '[alert]' ${\($t->testdir())}/error.log`, qr/^$/s, 'no alerts'); | |
124 | |
125 ############################################################################### | 121 ############################################################################### |