From 488a148d8b172e152e3450062b172ba516ab84b3 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 2 Jul 2012 04:20:20 +0000 Subject: test/lib_read_write: wait for readability before tryread On FreeBSD, writing to a loopback TCP socket does not guarantee immediate readability on the other end. Tested on Debian GNU/kFreeBSD 6.0 --- test/lib_read_write.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/test/lib_read_write.rb b/test/lib_read_write.rb index 04d6fc6..586e826 100644 --- a/test/lib_read_write.rb +++ b/test/lib_read_write.rb @@ -242,6 +242,7 @@ module LibReadWriteTest def test_tryread_too_much assert_equal nil, @wr.kgio_trywrite("hi") + assert_equal @rd, @rd.kgio_wait_readable assert_equal "hi", @rd.kgio_tryread(4) end -- cgit v1.2.3-24-ge0c7