changeset 1250:b708848eb49a

Tests: handled Cache::Memcached::Fast brokenness.
author Sergey Kandaurov <pluknet@nginx.com>
date Thu, 23 Nov 2017 14:42:47 +0300
parents 673c3e12214e
children 766bcbb632ee
files upstream_hash_memcached.t
diffstat 1 files changed, 15 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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 {