Skip to content

Commit

Permalink
Stops running Typhoeus tests in JRuby
Browse files Browse the repository at this point in the history
There's an issue with current versions of Typhoeus and libcurl, triggering a segmentation fault. I
will update to rerun these tests once there's a fix.
  • Loading branch information
picandocodigo committed Mar 25, 2021
1 parent 0855f59 commit 24d8c0b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@
it 'uses Faraday with the adapter' do
expect(adapter).to eq Faraday::Adapter::Typhoeus
end
end
end unless jruby?

context 'when the adapter is specified as a string key' do
let(:adapter) do
Expand Down Expand Up @@ -1758,7 +1758,7 @@
it 'preserves the other headers' do
expect(client.transport.connections[0].connection.headers['User-Agent'])
end
end
end unless jruby?
end
end

Expand Down
15 changes: 14 additions & 1 deletion elasticsearch-transport/test/integration/transport_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class Elasticsearch::Transport::ClientIntegrationTest < Minitest::Test
begin; Object.send(:remove_const, :Patron); rescue NameError; end
end

should "allow to customize the Faraday adapter" do
should "allow to customize the Faraday adapter to Typhoeus" do
require 'typhoeus'
require 'typhoeus/adapters/faraday'

Expand All @@ -34,6 +34,19 @@ class Elasticsearch::Transport::ClientIntegrationTest < Minitest::Test
f.adapter :typhoeus
end

client = Elasticsearch::Transport::Client.new transport: transport
client.perform_request 'GET', ''
end unless jruby?

should "allow to customize the Faraday adapter to NetHttpPersistent" do
require 'net/http/persistent'

transport = Elasticsearch::Transport::Transport::HTTP::Faraday.new \
:hosts => [ { host: @host, port: @port } ] do |f|
f.response :logger
f.adapter :net_http_persistent
end

client = Elasticsearch::Transport::Client.new transport: transport
client.perform_request 'GET', ''
end
Expand Down

0 comments on commit 24d8c0b

Please sign in to comment.