Skip to content

Commit 385626f

Browse files
codeminatormatthewd
andcommitted
Increase socket_timeout for memcached inside tests
It sounds like a default timeout of 1 second can sometimes not be enough. In normal operations, this should be fine (will result in a cache miss), but in these tests, we always expect the cache to return the value, hence doing this change for these tests only. Co-authored-by: Matthew Draper <[email protected]>
1 parent 47eaf88 commit 385626f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

activesupport/test/cache/stores/mem_cache_store_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def ensure_connected! # after https://github.com/petergoldstein/dalli/pull/863
4545
end
4646

4747
def lookup_store(*addresses, **options)
48-
cache = ActiveSupport::Cache.lookup_store(:mem_cache_store, *addresses, { namespace: @namespace, pool: false }.merge(options))
48+
cache = ActiveSupport::Cache.lookup_store(:mem_cache_store, *addresses, { namespace: @namespace, pool: false, socket_timeout: 60 }.merge(options))
4949
(@_stores ||= []) << cache
5050
cache
5151
end

0 commit comments

Comments
 (0)