Mercurial > hg > nginx-tests
changeset 587:c0b4ae82fd9d
Tests: adjusted memcached test timeouts.
Raised Cache::Memcached connect_timeout from the default value.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Mon, 25 May 2015 14:21:18 +0300 |
parents | ef2b435c1048 |
children | 53b7c3c33a79 |
files | gunzip_memcached.t memcached.t memcached_keepalive.t memcached_keepalive_stale.t upstream_hash_memcached.t |
diffstat | 5 files changed, 15 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/gunzip_memcached.t Wed May 20 19:18:42 2015 +0300 +++ b/gunzip_memcached.t Mon May 25 14:21:18 2015 +0300 @@ -80,7 +80,7 @@ # set and compressed value to be at least 20% less than original one. my $memd = Cache::Memcached->new(servers => [ '127.0.0.1:8081' ], - compress_threshold => 1); + compress_threshold => 1, connect_timeout => 1.0); $memd->set('/', 'TEST' x 10) or die "can't put value into memcached: $!";
--- a/memcached.t Wed May 20 19:18:42 2015 +0300 +++ b/memcached.t Mon May 25 14:21:18 2015 +0300 @@ -77,7 +77,8 @@ ############################################################################### -my $memd = Cache::Memcached->new(servers => [ '127.0.0.1:8081' ]); +my $memd = Cache::Memcached->new(servers => [ '127.0.0.1:8081' ], + connect_timeout => 1.0); $memd->set('/', 'SEE-THIS') or die "can't put value into memcached: $!";
--- a/memcached_keepalive.t Wed May 20 19:18:42 2015 +0300 +++ b/memcached_keepalive.t Mon May 25 14:21:18 2015 +0300 @@ -120,8 +120,10 @@ ############################################################################### -my $memd1 = Cache::Memcached->new(servers => [ '127.0.0.1:8081' ]); -my $memd2 = Cache::Memcached->new(servers => [ '127.0.0.1:8082' ]); +my $memd1 = Cache::Memcached->new(servers => [ '127.0.0.1:8081' ], + connect_timeout => 1.0); +my $memd2 = Cache::Memcached->new(servers => [ '127.0.0.1:8082' ], + connect_timeout => 1.0); $memd1->set('/', 'SEE-THIS'); $memd2->set('/', 'SEE-THIS');
--- a/memcached_keepalive_stale.t Wed May 20 19:18:42 2015 +0300 +++ b/memcached_keepalive_stale.t Mon May 25 14:21:18 2015 +0300 @@ -87,7 +87,8 @@ ############################################################################### -my $memd1 = Cache::Memcached->new(servers => [ '127.0.0.1:8081' ]); +my $memd1 = Cache::Memcached->new(servers => [ '127.0.0.1:8081' ], + connect_timeout => 1.0); # It's possible that stale events occur, i.e. read event handler called # for just saved upstream connection without any data available for
--- a/upstream_hash_memcached.t Wed May 20 19:18:42 2015 +0300 +++ b/upstream_hash_memcached.t Mon May 25 14:21:18 2015 +0300 @@ -119,9 +119,12 @@ ############################################################################### -my $memd1 = Cache::Memcached->new(servers => [ '127.0.0.1:8081' ]); -my $memd2 = Cache::Memcached->new(servers => [ '127.0.0.1:8082' ]); -my $memd3 = Cache::Memcached->new(servers => [ '127.0.0.1:8083' ]); +my $memd1 = Cache::Memcached->new(servers => [ '127.0.0.1:8081' ], + connect_timeout => 1.0); +my $memd2 = Cache::Memcached->new(servers => [ '127.0.0.1:8082' ], + connect_timeout => 1.0); +my $memd3 = Cache::Memcached->new(servers => [ '127.0.0.1:8083' ], + connect_timeout => 1.0); for my $i (1 .. 20) { $memd1->set($i, '8081') or die "can't put value into memcached: $!";