Skip to content

Commit 8084ecf

Browse files
✅ Add test coverage for #81
See #81
1 parent 2190725 commit 8084ecf

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

test/elasticsearch/api/http_test.exs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,18 @@ defmodule Elasticsearch.API.HTTPTest do
2727
[]
2828
)
2929
end
30+
31+
# See https://github.com/danielberkompas/elasticsearch-elixir/issues/81
32+
@tag :regression
33+
test "handles timeouts" do
34+
assert {:error, %HTTPoison.Error{reason: :timeout}} =
35+
HTTP.request(
36+
%{},
37+
:get,
38+
"http://#{System.get_env("ELASTICSEARCH_HOST", "localhost")}:9200/_cat/health",
39+
"",
40+
recv_timeout: 0
41+
)
42+
end
3043
end
3144
end

0 commit comments

Comments
 (0)