Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use omit instead of skip for test-unit #2

Merged
merged 1 commit into from
Jan 12, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions test/rinda/test_rinda.rb
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ def test_cancel_01
end

def test_cancel_02
skip 'this test is unstable with --jit-wait' if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled?
omit 'this test is unstable with --jit-wait' if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled?
entry = @ts.write([:removeme, 1])
assert_equal([[:removeme, 1]], @ts.read_all([nil, nil]))
entry.cancel
Expand Down Expand Up @@ -528,7 +528,7 @@ def test_remote_array_and_hash
end

def test_take_bug_8215
skip "this test randomly fails on mswin" if /mswin/ =~ RUBY_PLATFORM
omit "this test randomly fails on mswin" if /mswin/ =~ RUBY_PLATFORM
service = DRb.start_service("druby://localhost:0", @ts_base)

uri = service.uri
Expand Down Expand Up @@ -591,7 +591,7 @@ def prepare_ipv6(r)
return if
Socket.ip_address_list.any? { |addrinfo| addrinfo.ipv6? && !addrinfo.ipv6_loopback? }
end
skip 'IPv6 not available'
omit 'IPv6 not available'
end

def ipv6_mc(rf, hops = nil)
Expand Down Expand Up @@ -662,7 +662,7 @@ def _test_do_reply
end

def test_do_reply_local
skip 'timeout-based test becomes unstable with --jit-wait' if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled?
omit 'timeout-based test becomes unstable with --jit-wait' if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled?
with_timeout(30) {_test_do_reply_local}
end

Expand Down Expand Up @@ -693,7 +693,7 @@ def test_make_socket_ipv4_multicast
begin
v4mc = @rs.make_socket('239.0.0.1')
rescue Errno::ENOBUFS => e
skip "Missing multicast support in OS: #{e.message}"
omit "Missing multicast support in OS: #{e.message}"
end

begin
Expand All @@ -704,7 +704,7 @@ def test_make_socket_ipv4_multicast
end
rescue TypeError
if /aix/ =~ RUBY_PLATFORM
skip "Known bug in getsockopt(2) on AIX"
omit "Known bug in getsockopt(2) on AIX"
end
raise $!
end
Expand All @@ -714,15 +714,15 @@ def test_make_socket_ipv4_multicast
end

def test_make_socket_ipv6_multicast
skip 'IPv6 not available' unless
omit 'IPv6 not available' unless
Socket.ip_address_list.any? { |addrinfo| addrinfo.ipv6? && !addrinfo.ipv6_loopback? }

begin
v6mc = @rs.make_socket('ff02::1')
rescue Errno::EADDRNOTAVAIL
return # IPv6 address for multicast not available
rescue Errno::ENOBUFS => e
skip "Missing multicast support in OS: #{e.message}"
omit "Missing multicast support in OS: #{e.message}"
end

if Socket.const_defined?(:SO_REUSEPORT) then
Expand All @@ -740,7 +740,7 @@ def test_ring_server_ipv4_multicast
begin
@rs = Rinda::RingServer.new(@ts, [['239.0.0.1', '0.0.0.0']], @port)
rescue Errno::ENOBUFS => e
skip "Missing multicast support in OS: #{e.message}"
omit "Missing multicast support in OS: #{e.message}"
end

v4mc = @rs.instance_variable_get('@sockets').first
Expand All @@ -753,7 +753,7 @@ def test_ring_server_ipv4_multicast
end
rescue TypeError
if /aix/ =~ RUBY_PLATFORM
skip "Known bug in getsockopt(2) on AIX"
omit "Known bug in getsockopt(2) on AIX"
end
raise $!
end
Expand All @@ -763,7 +763,7 @@ def test_ring_server_ipv4_multicast
end

def test_ring_server_ipv6_multicast
skip 'IPv6 not available' unless
omit 'IPv6 not available' unless
Socket.ip_address_list.any? { |addrinfo| addrinfo.ipv6? && !addrinfo.ipv6_loopback? }

@rs.shutdown
Expand Down Expand Up @@ -852,7 +852,7 @@ def test_make_socket_unicast
assert(v4.getsockopt(:SOL_SOCKET, :SO_BROADCAST).bool)
rescue TypeError
if /aix/ =~ RUBY_PLATFORM
skip "Known bug in getsockopt(2) on AIX"
omit "Known bug in getsockopt(2) on AIX"
end
raise $!
ensure
Expand Down