Skip to content

Commit cc12511

Browse files
committed
Stops running Typhoeus tests in JRuby
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.
1 parent 7f3f059 commit cc12511

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

elasticsearch-transport/spec/elasticsearch/transport/client_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@
266266
it 'uses Faraday with the adapter' do
267267
expect(adapter).to eq Faraday::Adapter::Typhoeus
268268
end
269-
end
269+
end unless jruby?
270270

271271
context 'when the adapter is specified as a string key' do
272272
let(:adapter) do
@@ -1776,7 +1776,7 @@
17761776
it 'preserves the other headers' do
17771777
expect(client.transport.connections[0].connection.headers['User-Agent'])
17781778
end
1779-
end
1779+
end unless jruby?
17801780
end
17811781
end
17821782

elasticsearch-transport/test/integration/transport_test.rb

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class Elasticsearch::Transport::ClientIntegrationTest < Elasticsearch::Test::Int
3232
begin; Object.send(:remove_const, :Patron); rescue NameError; end
3333
end
3434

35-
should "allow to customize the Faraday adapter" do
35+
should "allow to customize the Faraday adapter to Typhoeus" do
3636
require 'typhoeus'
3737
require 'typhoeus/adapters/faraday'
3838

@@ -42,6 +42,19 @@ class Elasticsearch::Transport::ClientIntegrationTest < Elasticsearch::Test::Int
4242
f.adapter :typhoeus
4343
end
4444

45+
client = Elasticsearch::Transport::Client.new transport: transport
46+
client.perform_request 'GET', ''
47+
end unless jruby?
48+
49+
should "allow to customize the Faraday adapter to NetHttpPersistent" do
50+
require 'net/http/persistent'
51+
52+
transport = Elasticsearch::Transport::Transport::HTTP::Faraday.new \
53+
:hosts => [ { host: @host, port: @port } ] do |f|
54+
f.response :logger
55+
f.adapter :net_http_persistent
56+
end
57+
4558
client = Elasticsearch::Transport::Client.new transport: transport
4659
client.perform_request 'GET', ''
4760
end

0 commit comments

Comments
 (0)