summaryrefslogtreecommitdiff
path: root/test/socket/test_nonblock.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/socket/test_nonblock.rb')
-rw-r--r--test/socket/test_nonblock.rb16
1 files changed, 9 insertions, 7 deletions
diff --git a/test/socket/test_nonblock.rb b/test/socket/test_nonblock.rb
index 5d45593439..68fefc44b3 100644
--- a/test/socket/test_nonblock.rb
+++ b/test/socket/test_nonblock.rb
@@ -104,7 +104,7 @@ class TestSocketNonblock < Test::Unit::TestCase
assert_raise(IO::WaitReadable) { u1.recvfrom_nonblock(100) }
u2.send("", 0, u1.getsockname)
assert_nothing_raised("cygwin 1.5.19 has a problem to send an empty UDP packet. [ruby-dev:28915]") {
- Timeout.timeout(1) { IO.select [u1] }
+ Timeout.timeout(30) { IO.select [u1] }
}
mesg, inet_addr = u1.recvfrom_nonblock(100)
assert_equal("", mesg)
@@ -126,7 +126,7 @@ class TestSocketNonblock < Test::Unit::TestCase
assert_raise(IO::WaitReadable) { u1.recv_nonblock(100) }
u2.send("", 0, u1.getsockname)
assert_nothing_raised("cygwin 1.5.19 has a problem to send an empty UDP packet. [ruby-dev:28915]") {
- Timeout.timeout(1) { IO.select [u1] }
+ Timeout.timeout(30) { IO.select [u1] }
}
mesg = u1.recv_nonblock(100)
assert_equal("", mesg)
@@ -279,7 +279,7 @@ class TestSocketNonblock < Test::Unit::TestCase
s1.sendmsg_nonblock("a" * 100000)
}
rescue NotImplementedError, Errno::ENOSYS
- skip "sendmsg not implemented on this platform: #{$!}"
+ omit "sendmsg not implemented on this platform: #{$!}"
rescue Errno::EMSGSIZE
# UDP has 64K limit (if no Jumbograms). No problem.
rescue Errno::EWOULDBLOCK
@@ -307,11 +307,13 @@ class TestSocketNonblock < Test::Unit::TestCase
loop { s1.sendmsg_nonblock(buf) }
end
end
- rescue NotImplementedError, Errno::ENOSYS, Errno::EPROTONOSUPPORT
- skip "UNIXSocket.pair(:SEQPACKET) not implemented on this platform: #{$!}"
+ rescue NotImplementedError, Errno::ENOSYS, Errno::EPROTONOSUPPORT, Errno::EPROTOTYPE
+ omit "UNIXSocket.pair(:SEQPACKET) not implemented on this platform: #{$!}"
end
def test_sendmsg_nonblock_no_exception
+ omit "AF_UNIX + SEQPACKET is not supported on windows" if /mswin|mingw/ =~ RUBY_PLATFORM
+
buf = '*' * 4096
UNIXSocket.pair(:SEQPACKET) do |s1, s2|
n = 0
@@ -329,7 +331,7 @@ class TestSocketNonblock < Test::Unit::TestCase
end
end
rescue NotImplementedError, Errno::ENOSYS, Errno::EPROTONOSUPPORT
- skip "UNIXSocket.pair(:SEQPACKET) not implemented on this platform: #{$!}"
+ omit "UNIXSocket.pair(:SEQPACKET) not implemented on this platform: #{$!}"
end
end
@@ -338,7 +340,7 @@ class TestSocketNonblock < Test::Unit::TestCase
begin
s1.recvmsg_nonblock(4096)
rescue NotImplementedError
- skip "recvmsg not implemented on this platform."
+ omit "recvmsg not implemented on this platform."
rescue Errno::EWOULDBLOCK
assert_kind_of(IO::WaitReadable, $!)
end