Handle port-less $MEMCACHE_SERVERS in MemCacheStore tests
Devs may be running tests on a machine which provides $MEMCACHE_SERVERS without a trailing port. We should allow for this when checking if Memcache is working.
This commit is contained in:
parent
0a608bd987
commit
a812537e4d
@ -40,7 +40,7 @@ def call_reset_session
|
||||
require "dalli"
|
||||
servers = ENV["MEMCACHE_SERVERS"] || "localhost:11211"
|
||||
ss = Dalli::Client.new(servers).stats
|
||||
raise Dalli::DalliError unless ss[servers]
|
||||
raise Dalli::DalliError unless ss[servers] || ss[servers + ":11211"]
|
||||
|
||||
def test_setting_and_getting_session_value
|
||||
with_test_route_set do
|
||||
|
@ -27,7 +27,7 @@ class MemCacheStoreTest < ActiveSupport::TestCase
|
||||
begin
|
||||
servers = ENV["MEMCACHE_SERVERS"] || "localhost:11211"
|
||||
ss = Dalli::Client.new(servers).stats
|
||||
raise Dalli::DalliError unless ss[servers]
|
||||
raise Dalli::DalliError unless ss[servers] || ss[servers + ":11211"]
|
||||
|
||||
MEMCACHE_UP = true
|
||||
rescue Dalli::DalliError
|
||||
|
Loading…
Reference in New Issue
Block a user