diff --git a/Gemfile b/Gemfile index 280b4f16..6ae4a9a1 100644 --- a/Gemfile +++ b/Gemfile @@ -7,7 +7,7 @@ end group :test do gem 'em-http-request', '~> 1.0', :require => 'em-http' gem 'em-synchrony', '~> 1.0', :require => ['em-synchrony', 'em-synchrony/em-http'], :platforms => :ruby_19 - gem 'excon', '>= 0.14.1' + gem 'excon', '>= 0.16.1' gem 'httpclient', '~> 2.2' gem 'net-http-persistent', '~> 2.5', :require => false gem 'leftright', '~> 0.9', :require => false diff --git a/lib/faraday/adapter/excon.rb b/lib/faraday/adapter/excon.rb index ea279a7f..c8cd3e68 100644 --- a/lib/faraday/adapter/excon.rb +++ b/lib/faraday/adapter/excon.rb @@ -16,6 +16,10 @@ module Faraday opts[:ssl_verify_peer] = !!ssl.fetch(:verify, true) opts[:ssl_ca_path] = ssl[:ca_path] if ssl[:ca_path] opts[:ssl_ca_file] = ssl[:ca_file] if ssl[:ca_file] + + # https://github.com/geemus/excon/issues/106 + # https://github.com/jruby/jruby-ossl/issues/19 + opts[:nonblock] = false end if ( req = env[:request] ) diff --git a/test/adapters/excon_test.rb b/test/adapters/excon_test.rb index 0cfa8ff3..29d3ce54 100644 --- a/test/adapters/excon_test.rb +++ b/test/adapters/excon_test.rb @@ -5,6 +5,9 @@ module Adapters def adapter() :excon end - Integration.apply(self, :NonParallel) + Integration.apply(self, :NonParallel) do + # https://github.com/geemus/excon/issues/126 ? + undef :test_timeout if ssl_mode? + end end end diff --git a/test/helper.rb b/test/helper.rb index 84f0ab6e..027b33cf 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -74,6 +74,10 @@ module Faraday defined? RUBY_ENGINE and 'jruby' == RUBY_ENGINE end + def self.rbx? + defined? RUBY_ENGINE and 'rbx' == RUBY_ENGINE + end + def self.ssl_mode? ENV['SSL'] == 'yes' end