about summary refs log tree commit homepage
path: root/test/test_ssl.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_ssl.rb')
-rw-r--r--test/test_ssl.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/test_ssl.rb b/test/test_ssl.rb
index 890cf58..2ed601c 100644
--- a/test/test_ssl.rb
+++ b/test/test_ssl.rb
@@ -6,6 +6,15 @@ class TestSSL < Testcase
   ENV["N"].to_i > 1 and parallelize_me!
   include ServerHelper
 
+  r, w = IO.pipe
+  FAST_NB = begin
+    :wait_readable == r.read_nonblock(1, exception: false)
+  rescue
+    false
+  end
+  r.close
+  w.close
+
   # copied from test/openssl/utils.rb in Ruby:
 
   TEST_KEY_DH1024 = OpenSSL::PKey::DH.new <<-_end_of_pem_
@@ -23,6 +32,10 @@ AQjjxMXhwULlmuR/K+WwlaZPiLIBYalLAZQ7ZbOPeVkJ8ePao0eLAgEC
      "EF3EF13AB47A15275FC2836F3AC74CEA", 16)
 
   def setup
+    unless FAST_NB
+      skip "missing exception-free non-blocking IO in " \
+           "#{RUBY_ENGINE} #{RUBY_VERSION}"
+    end
     server_helper_setup
   end