Sha256: 55ad9713eb90a219a4c352973ce9f7533b4705a94fc9c56e98dc2e663ea70fbc
Contents?: true
Size: 454 Bytes
Versions: 6
Compression:
Stored size: 454 Bytes
Contents
require 'lru_redux' require 'minitest/autorun' require 'minitest/pride' class ThreadSafeCacheTest < MiniTest::Unit::TestCase def test_additions cache = LruRedux::ThreadSafeCache.new(1000) threads = [] 4.times do |t| threads << Thread.new do 250.times do |i| cache[i] = "#{t} #{i}" end end end threads.each{|t| t.join} assert_equal cache.count,250 assert true, cache.valid? end end
Version data entries
6 entries across 6 versions & 1 rubygems