about summary refs log tree commit homepage
path: root/test
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2012-03-05 23:19:29 +0000
committerEric Wong <normalperson@yhbt.net>2012-03-05 23:21:28 +0000
commit1129029ab1bf886979a66a69b04d244dba8b63cf (patch)
tree8dc3bf26b1446931430ef8e378cc9712f6118b2d /test
parent56cce133d979c22bbef80fdba1881d8f40876e2f (diff)
downloadkgio-1129029ab1bf886979a66a69b04d244dba8b63cf.tar.gz
It seems autopush support in our autopush code has
always been broken outside of Linux-based systems,
as we never marked the socket as having pending data.
Diffstat (limited to 'test')
-rw-r--r--test/test_autopush.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/test_autopush.rb b/test/test_autopush.rb
index 24b300f..57fbefa 100644
--- a/test/test_autopush.rb
+++ b/test/test_autopush.rb
@@ -38,7 +38,8 @@ class TestAutopush < Test::Unit::TestCase
     assert_nothing_raised { s.kgio_write 'asdf' }
     assert_equal :wait_readable, s.kgio_tryread(1)
     assert s.kgio_autopush?
-    assert_equal 1, s.getsockopt(Socket::IPPROTO_TCP, opt).unpack('i')[0]
+    val = s.getsockopt(Socket::IPPROTO_TCP, opt).unpack('i')[0]
+    assert_operator val, :>, 0, "#{opt}=#{val} (#{RUBY_PLATFORM})"
   end
 
   def test_autopush_true_unix