From 3179733e19ce866c4d0c412d2175cd7e077bafdb Mon Sep 17 00:00:00 2001 From: Jamis Buck Date: Thu, 24 Oct 2024 15:14:27 -0600 Subject: [PATCH] RubyDNS is failing oddly with Ruby 2.7, so let's just skip it --- spec/integration/reconnect_spec.rb | 2 ++ spec/integration/srv_monitoring_spec.rb | 2 ++ spec/support/constraints.rb | 10 ++++++++++ 3 files changed, 14 insertions(+) diff --git a/spec/integration/reconnect_spec.rb b/spec/integration/reconnect_spec.rb index ad4f0e5647..0fa47c29af 100644 --- a/spec/integration/reconnect_spec.rb +++ b/spec/integration/reconnect_spec.rb @@ -111,6 +111,8 @@ # thread.kill should've similarly failed, but it doesn't. fails_on_jruby + minimum_mri_version '3.0.0' + it 'recreates SRV monitor' do wait_for_discovery diff --git a/spec/integration/srv_monitoring_spec.rb b/spec/integration/srv_monitoring_spec.rb index 857ddd1584..ffa58b053f 100644 --- a/spec/integration/srv_monitoring_spec.rb +++ b/spec/integration/srv_monitoring_spec.rb @@ -76,6 +76,8 @@ # NotImplementedError: recvmsg_nonblock is not implemented fails_on_jruby + minimum_mri_version '3.0.0' + around do |example| # Speed up the tests by listening on the fake ports we are using. done = false diff --git a/spec/support/constraints.rb b/spec/support/constraints.rb index 6d92409937..8c7f3f940d 100644 --- a/spec/support/constraints.rb +++ b/spec/support/constraints.rb @@ -17,6 +17,16 @@ def require_local_tls end end + def minimum_mri_version(version) + require_mri + + before(:all) do + if RUBY_VERSION < version + skip "Ruby #{version} or greater is required" + end + end + end + def forbid_x509_auth before(:all) do skip 'X.509 auth not allowed' if SpecConfig.instance.x509_auth?