Skip to content

Commit dfa9a12

Browse files
committed
mingw environment can't bind free port with 10 times. We should omit it instead of test failure.
``` 1) Error: TestResolvDNS#test_multiple_servers_with_timeout_and_truncated_tcp_fallback: Errno::EACCES: Permission denied - bind(2) for "127.0.0.1" port 59677 D:/a/ruby/ruby/src/test/resolv/test_dns.rb:78:in 'TCPServer#initialize' D:/a/ruby/ruby/src/test/resolv/test_dns.rb:78:in 'TCPServer.new' D:/a/ruby/ruby/src/test/resolv/test_dns.rb:78:in 'TestResolvDNS#with_udp_and_tcp' D:/a/ruby/ruby/src/test/resolv/test_dns.rb:711:in 'TestResolvDNS#test_multiple_servers_with_timeout_and_truncated_tcp_fallback' 2) Error: TestResolvDNS#test_query_ipv4_address_truncated_tcp_fallback: Errno::EACCES: Permission denied - bind(2) for "127.0.0.1" port 59689 D:/a/ruby/ruby/src/test/resolv/test_dns.rb:78:in 'TCPServer#initialize' D:/a/ruby/ruby/src/test/resolv/test_dns.rb:78:in 'TCPServer.new' D:/a/ruby/ruby/src/test/resolv/test_dns.rb:78:in 'TestResolvDNS#with_udp_and_tcp' D:/a/ruby/ruby/src/test/resolv/test_dns.rb:223:in 'TestResolvDNS#test_query_ipv4_address_truncated_tcp_fallback' ```
1 parent 56ab6ea commit dfa9a12

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/resolv/test_dns.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def with_udp_and_tcp(host, port)
8989
u = nil
9090
retry
9191
end
92-
raise
92+
omit "Could not find a free port after 10 retries"
9393
end
9494

9595
# If we get to this point, we have a valid t & u socket

0 commit comments

Comments
 (0)