Permalink
Browse files

preventing memcached initialization errors with default servers list [#…

…4921 state:resolved]

As of this writing the JRuby client does not support a default port.

Signed-off-by: Xavier Noria <fxn@hashref.com>
  • Loading branch information...
1 parent 256a33d commit b8330a22619f647f16a671c1ad58730d8896f806 @calavera calavera committed with fxn Jun 21, 2010
@@ -35,7 +35,7 @@ module Response # :nodoc:
def self.build_mem_cache(*addresses)
addresses = addresses.flatten
options = addresses.extract_options!
- addresses = ["localhost"] if addresses.empty?
+ addresses = ["localhost:11211"] if addresses.empty?
MemCache.new(addresses, options)
end
@@ -25,7 +25,7 @@
def uses_memcached(test_name)
require 'memcache'
begin
- MemCache.new('localhost').stats
+ MemCache.new('localhost:11211').stats
yield
rescue MemCache::MemCacheError
$stderr.puts "Skipping #{test_name} tests. Start memcached and try again."

0 comments on commit b8330a2

Please sign in to comment.