From 71cf80ca144cdd6e58b0c1747b71b92d5615c73d Mon Sep 17 00:00:00 2001 From: Evan Weaver Date: Sun, 13 Jun 2010 16:48:06 -0700 Subject: [PATCH] Improve test. --- test/unit/memcached_test.rb | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/test/unit/memcached_test.rb b/test/unit/memcached_test.rb index 1b8e506..4704f8e 100644 --- a/test/unit/memcached_test.rb +++ b/test/unit/memcached_test.rb @@ -256,10 +256,13 @@ class MemcachedTest < Test::Unit::TestCase end def test_get_from_last - @cache.set key, "hello" - assert_equal "hello", @cache.get(key) - assert_equal "hello", @cache.get_from_last(key) - @cache.delete key + cache = Memcached.new(@servers, :distribution => :random) + 10.times do |n| + cache.set key, n + end + 10.times do + assert_equal cache.get(key), cache.get_from_last(key) + end end def test_get_missing