Skip to content

Commit

Permalink
Replace SecureRandom.random_bytes by Random.bytes in cache store tests
Browse files Browse the repository at this point in the history
It cause cause /dev/urandom exhaustion on some systems (mostly macOS).
  • Loading branch information
byroot committed Apr 21, 2021
1 parent d927db7 commit 5649be9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion activesupport/test/cache/behaviors/cache_store_behavior.rb
Expand Up @@ -254,7 +254,7 @@ def test_incompressible_data

# generate an incompressible string
loop do
incompressible = SecureRandom.random_bytes(1.kilobyte)
incompressible = Random.bytes(1.kilobyte)
break if incompressible.bytesize < Zlib::Deflate.deflate(incompressible).bytesize
end

Expand Down

0 comments on commit 5649be9

Please sign in to comment.