aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/test')
-rw-r--r--activesupport/test/caching_test.rb8
-rw-r--r--activesupport/test/share_lock_test.rb2
2 files changed, 9 insertions, 1 deletions
diff --git a/activesupport/test/caching_test.rb b/activesupport/test/caching_test.rb
index 854fcce4ef..94e73b6df3 100644
--- a/activesupport/test/caching_test.rb
+++ b/activesupport/test/caching_test.rb
@@ -625,6 +625,14 @@ module LocalCacheBehavior
end
end
+ def test_local_cache_of_read_nil
+ @cache.with_local_cache do
+ assert_equal nil, @cache.read('foo')
+ @cache.send(:bypass_local_cache) { @cache.write 'foo', 'bar' }
+ assert_equal nil, @cache.read('foo')
+ end
+ end
+
def test_local_cache_of_write_nil
@cache.with_local_cache do
assert @cache.write('foo', nil)
diff --git a/activesupport/test/share_lock_test.rb b/activesupport/test/share_lock_test.rb
index ad41db608b..465a657308 100644
--- a/activesupport/test/share_lock_test.rb
+++ b/activesupport/test/share_lock_test.rb
@@ -1,5 +1,5 @@
require 'abstract_unit'
-require 'concurrent/atomics'
+require 'concurrent/atomic/count_down_latch'
require 'active_support/concurrency/share_lock'
class ShareLockTest < ActiveSupport::TestCase