summaryrefslogtreecommitdiff
path: root/test/resolv/test_dns.rb
diff options
context:
space:
mode:
authorMSP-Greg <MSP-Greg@users.noreply.github.com>2019-12-31 01:19:31 -0600
committerTakashi Kokubun <takashikkbn@gmail.com>2019-12-30 23:19:31 -0800
commiteb2b4258214337f165eb994e2c5b9c2a3f6ae0a8 (patch)
treeb0ddd5b4045ce415aba441d97a63b202e59ef406 /test/resolv/test_dns.rb
parent79c420267672dbfde257d77eb9d94c996920f368 (diff)
MinGW on Actions (#2791)
* MinGW - skip spec in spec/ruby/optional/capi/thread_spec.rb C-API Thread function rb_thread_call_without_gvl -- runs a C function with the global lock unlocked and unlocks IO with the generic RUBY_UBF_IO stops/freezes spec tests See https://bugs.ruby-lang.org/issues/16265 * MinGW - skip test test/resolv/test_dns.rb Test times out in CI (both AppVeyor & Actions), cannot repo locally * MinGW - skip test test/ruby/test_thread_queue.rb * Add Actions mingw.yml
Diffstat (limited to 'test/resolv/test_dns.rb')
-rw-r--r--test/resolv/test_dns.rb17
1 files changed, 13 insertions, 4 deletions
diff --git a/test/resolv/test_dns.rb b/test/resolv/test_dns.rb
index d69bec8..70d5067 100644
--- a/test/resolv/test_dns.rb
+++ b/test/resolv/test_dns.rb
@@ -162,10 +162,19 @@ class TestResolvDNS < Test::Unit::TestCase
# A race condition here.
# Another program may use the port.
# But no way to prevent it.
- Timeout.timeout(5) do
- Resolv::DNS.open(:nameserver_port => [[host, port]]) {|dns|
- assert_equal([], dns.getresources("test-no-server.example.org", Resolv::DNS::Resource::IN::A))
- }
+ begin
+ Timeout.timeout(5) do
+ Resolv::DNS.open(:nameserver_port => [[host, port]]) {|dns|
+ assert_equal([], dns.getresources("test-no-server.example.org", Resolv::DNS::Resource::IN::A))
+ }
+ end
+ rescue Timeout::Error
+ if RUBY_PLATFORM.match?(/mingw/)
+ # cannot repo locally
+ skip 'Timeout Error on MinGW CI'
+ else
+ raise Timeout::Error
+ end
end
end