about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2013-07-18 20:21:43 +0000
committerEric Wong <normalperson@yhbt.net>2013-07-19 01:29:59 +0000
commit4c6a7474a281451b1ef57f686b9b21cbb8216b0d (patch)
treed3b223e2595df267b4b9b558c5605c0dac7b14e8
parent6d2642bb1a42840e809e7a73896a1631d37b15e6 (diff)
downloadcmogstored-4c6a7474a281451b1ef57f686b9b21cbb8216b0d.tar.gz
mgmt may now encounter large rbufs, so ensure that uncommon case
is tested.
-rw-r--r--test/mgmt.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/mgmt.rb b/test/mgmt.rb
index 041d13d..9b3c7a3 100644
--- a/test/mgmt.rb
+++ b/test/mgmt.rb
@@ -164,6 +164,18 @@ class TestMgmt < Test::Unit::TestCase
     assert_equal "/missing -1\r\n", @client.gets
   end
 
+  def test_trickle_too_large
+    @client.write "size /"
+    Thread.pass
+    # this should hit the 64K limit
+    assert_raises(Errno::EPIPE, Errno::ECONNRESET) do
+      loop do
+        @client.write("12345")
+        Thread.pass
+      end
+    end
+  end
+
   def test_client_eof
     t("/missing -1", "size /missing")
     @client.close