Skip to content

Commit 33678e0

Browse files
committed
Tests: handled Cache::Memcached::Fast brokenness.
1 parent d90302a commit 33678e0

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

Diff for: upstream_hash_memcached.t

+15
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,18 @@ $memd = new Cache::Memcached::Fast({ ketama_points => 160, servers => [
142142
'127.0.0.1:' . port(8082),
143143
'127.0.0.1:' . port(8083)] });
144144

145+
# Cache::Memcached::Fast may be incompatible with recent Perl,
146+
# see https://github.com/JRaspass/Cache-Memcached-Fast/issues/12
147+
148+
my $cmf_bug = ! keys %{$memd->server_versions};
149+
150+
SKIP: {
151+
skip 'Cache::Memcached::Fast bug', 1 if $cmf_bug;
152+
145153
is_deeply(ngx('/c'), mem($memd), 'cache::memcached::fast');
146154

155+
}
156+
147157
$memd = new Cache::Memcached(servers => [
148158
[ '127.0.0.1:' . port(8081), 2 ],
149159
[ '127.0.0.1:' . port(8082), 3 ],
@@ -156,8 +166,13 @@ $memd = new Cache::Memcached::Fast({ ketama_points => 160, servers => [
156166
{ address => '127.0.0.1:' . port(8082), weight => 3 },
157167
{ address => '127.0.0.1:' . port(8083), weight => 1 }] });
158168

169+
SKIP: {
170+
skip 'Cache::Memcached::Fast bug', 1 if $cmf_bug;
171+
159172
is_deeply(ngx('/cw'), mem($memd), 'cache::memcached::fast weight');
160173

174+
}
175+
161176
###############################################################################
162177

163178
sub ngx {

0 commit comments

Comments
 (0)