зеркало из https://github.com/github/memcached.git
Tired of 4 != 4.
This commit is contained in:
Родитель
3f20326079
Коммит
63453d4bb8
|
@ -429,12 +429,15 @@ class MemcachedTest < Test::Unit::TestCase
|
|||
cache.flush
|
||||
20.times { |i| cache.set "#{key}#{i}", @value }
|
||||
|
||||
cache, hits = Memcached.new(@servers.first), 0
|
||||
20.times do |i|
|
||||
begin
|
||||
cache.get "#{key}#{i}"
|
||||
hits += 1
|
||||
rescue Memcached::NotFound
|
||||
cache, hits = Memcached.new(@servers.first), 4
|
||||
while hits == 4 do
|
||||
hits = 0
|
||||
20.times do |i|
|
||||
begin
|
||||
cache.get "#{key}#{i}"
|
||||
hits += 1
|
||||
rescue Memcached::NotFound
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче