comparison memcached_keepalive.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(16) 28 ->has_daemon('memcached')->plan(15)
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;
188 188
189 is($memd1->stats()->{total}->{total_connections} + 189 is($memd1->stats()->{total}->{total_connections} +
190 $memd2->stats()->{total}->{total_connections}, $total + 2, 190 $memd2->stats()->{total}->{total_connections}, $total + 2,
191 'connection per backend'); 191 'connection per backend');
192 192
193 $t->stop();
194
195 like(`grep -F '[alert]' ${\($t->testdir())}/error.log`, qr/^$/s, 'no alerts');
196
197 ############################################################################### 193 ###############################################################################