<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -382,19 +382,21 @@ class MemcachedTest &lt; Test::Unit::TestCase
     end
   end
 
-  def test_get_with_random_distribution
+  def test_random_distribution_is_statistically_random
     cache = Memcached.new(@servers, :distribution =&gt; :random)
-    cache.set key, @value
+    cache.flush
+    20.times { |i| cache.set &quot;#{key}#{i}&quot;, @value }
     
-    hits = (0..10).to_a.map do
+    cache, hits = Memcached.new(@servers.first), 0
+    20.times do |i| 
       begin
-        cache.get(key)
+        cache.get &quot;#{key}#{i}&quot;
+        hits += 1
       rescue Memcached::NotFound
       end
-    end.compact.size
+    end
 
-    assert 0 &lt; hits
-    assert 10 &gt; hits
+    assert_not_equal 4, hits
   end
 
   # Set</diff>
      <filename>test/unit/memcached_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>3b793f49ed220d149f0c20df579b1fa2254eaece</id>
    </parent>
  </parents>
  <author>
    <name>Evan Weaver</name>
    <email>eweaver@twitter.com</email>
  </author>
  <url>http://github.com/chriseppstein/memcached/commit/d350eff56754139249313f7496f77070898599ae</url>
  <id>d350eff56754139249313f7496f77070898599ae</id>
  <committed-date>2009-09-02T11:10:33-07:00</committed-date>
  <authored-date>2009-09-02T11:10:33-07:00</authored-date>
  <message>Working (but failing) test for random distribution.</message>
  <tree>944b9fad4e7e4b725a7c9d054e1c80cb79f9bd27</tree>
  <committer>
    <name>Evan Weaver</name>
    <email>eweaver@twitter.com</email>
  </committer>
</commit>
