From 5e19f7901d68c6b5caadbb4beb2d82c1f2883b4f Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 7 Dec 2004 18:26:12 +0000 Subject: * test/io/nonblock/test_flush.rb (TestIONonblock#test_flush): write operation ignores EAGAIN. * test/ruby/test_super.rb (TestSuper#test_define_method): test for super from proc. [ruby-core:03856] * test/socket/test_tcp.rb (TestTCPSocket#test_recvfrom): make execution order more precise. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@7496 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/socket/test_tcp.rb | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'test/socket') diff --git a/test/socket/test_tcp.rb b/test/socket/test_tcp.rb index e05962198..8d55c011c 100644 --- a/test/socket/test_tcp.rb +++ b/test/socket/test_tcp.rb @@ -7,17 +7,22 @@ end class TestTCPSocket < Test::Unit::TestCase def test_recvfrom # [ruby-dev:24705] + c = s = nil svr = TCPServer.new("localhost", 0) Thread.new { - svr.accept.print("x"*0x1000) + c = svr.accept + Thread.pass until s + c.print("x"*0x1000) } addr = svr.addr sock = TCPSocket.open(addr[2], addr[1]) Thread.new { - Thread.pass + Thread.pass until c + Thread.critical = true ObjectSpace.each_object(String) {|s| - s.replace "a" if s.length == 0x10000 + s.replace "a" if s.length == 0x10000 and !s.frozen? } + Thread.critical = false } assert_raise(RuntimeError, SocketError) { sock.recvfrom(0x10000) -- cgit