0001-test-socket-test_unix-fix-test-failures-from-rb_mod_.patch

Eric Wong, 04/07/2011 11:44 AM

Download (1.25 KB)

View differences:

test/socket/test_unix.rb
295 295

  
296 296
  def test_dgram_pair
297 297
    s1, s2 = UNIXSocket.pair(Socket::SOCK_DGRAM)
298
    assert_raise(Errno::EAGAIN) { s1.recv_nonblock(10) }
298
    e = assert_raise(IO::WaitReadable) { s1.recv_nonblock(10) }
299
    assert_kind_of Errno::EAGAIN, e
299 300
    s2.send("", 0)
300 301
    s2.send("haha", 0)
301 302
    s2.send("", 0)
......
304 305
    assert_equal("haha", s1.recv(10))
305 306
    assert_equal("", s1.recv(10))
306 307
    assert_equal("", s1.recv(10))
307
    assert_raise(Errno::EAGAIN) { s1.recv_nonblock(10) }
308
    e = assert_raise(IO::WaitReadable) { s1.recv_nonblock(10) }
309
    assert_kind_of Errno::EAGAIN, e
308 310
  ensure
309 311
    s1.close if s1
310 312
    s2.close if s2
311
-