ruby / resolv

A thread-aware DNS resolver library written in Ruby
Other
36 stars 28 forks source link

Add an explicit with_udp_and_tcp helper to test_dns.rb #49

Closed KJTsanaktsidis closed 3 months ago

KJTsanaktsidis commented 3 months ago

This helper tries to bind UDP and TCP sockets to the same port, by retrying the bind if the randomly-assinged UDP port is already taken in TCP. This fixes a flaky test.

See https://github.com/ruby/ruby/actions/runs/8497267556/job/23275642160 for an example of such flake, and https://bugs.ruby-lang.org/issues/20403 for more details.

[Bug #20403]