# HG changeset patch # User Sergey Kandaurov # Date 1511437367 -10800 # Node ID b708848eb49a2420703e075cd10ebad10b12a622 # Parent 673c3e12214ebfecb175e57e92852e6d7807b364 Tests: handled Cache::Memcached::Fast brokenness. diff --git a/upstream_hash_memcached.t b/upstream_hash_memcached.t --- a/upstream_hash_memcached.t +++ b/upstream_hash_memcached.t @@ -142,8 +142,18 @@ is_deeply(ngx('/'), mem($memd), 'cache:: '127.0.0.1:' . port(8082), '127.0.0.1:' . port(8083)] }); +# Cache::Memcached::Fast may be incompatible with recent Perl, +# see https://github.com/JRaspass/Cache-Memcached-Fast/issues/12 + +my $cmf_bug = ! keys %{$memd->server_versions}; + +SKIP: { +skip 'Cache::Memcached::Fast bug', 1 if $cmf_bug; + is_deeply(ngx('/c'), mem($memd), 'cache::memcached::fast'); +} + $memd = new Cache::Memcached(servers => [ [ '127.0.0.1:' . port(8081), 2 ], [ '127.0.0.1:' . port(8082), 3 ], @@ -156,8 +166,13 @@ is_deeply(ngx('/w'), mem($memd), 'cache: { address => '127.0.0.1:' . port(8082), weight => 3 }, { address => '127.0.0.1:' . port(8083), weight => 1 }] }); +SKIP: { +skip 'Cache::Memcached::Fast bug', 1 if $cmf_bug; + is_deeply(ngx('/cw'), mem($memd), 'cache::memcached::fast weight'); +} + ############################################################################### sub ngx {