Skip to content

Commit 6e9f9b4

Browse files
committed
Get rid of another SecureRandom.hex in MemCachedStoreTest
This random value doesn't need to be "secure", and calling SecureRandom so much cause /dev/urandom exhaustion on macOS
1 parent d42a34a commit 6e9f9b4

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
@@ -42,7 +42,7 @@ def lookup_store(options = {})
4242
def setup
4343
skip "memcache server is not up" unless MEMCACHE_UP
4444

45-
@namespace = "test-#{SecureRandom.hex}"
45+
@namespace = "test-#{Random.rand(16**32).to_s(16)}"
4646
@cache = lookup_store(expires_in: 60)
4747
@peek = lookup_store
4848
@cache.logger = ActiveSupport::Logger.new(File::NULL)

0 commit comments

Comments
 (0)