Skip to content

Commit

Permalink
mingw environment can't bind free port with 10 times. We should omit …
Browse files Browse the repository at this point in the history
…it instead of test failrue.

```
 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'
```
  • Loading branch information
hsbt committed Oct 9, 2024
1 parent 09d5f3c commit 13ab318
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/resolv/test_dns.rb
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def with_udp_and_tcp(host, port)
u = nil
retry
end
raise
omit "Could not find a free port after 10 retries"
end

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

0 comments on commit 13ab318

Please sign in to comment.