Skip to content

Commit

Permalink
Special-case timeout test for http2
Browse files Browse the repository at this point in the history
  • Loading branch information
puzza007 committed Sep 20, 2019
1 parent a157b49 commit c829023
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions test/katipo_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -580,8 +580,13 @@ proxy_couldnt_connect(_) ->

timeout_ms(Config) ->
HTTPVersion = ?config(http_version, Config),
{error, #{code := operation_timedout}} =
katipo:get(?POOL, httpbin_url(Config, <<"/delay/1">>), #{timeout_ms => 500, http_version => HTTPVersion}).
ok = case katipo:get(?POOL, httpbin_url(Config, <<"/delay/1">>), #{timeout_ms => 500, http_version => HTTPVersion}) of
{error, #{code := operation_timedout}} ->
ok;
%% http2 seems to return this when it times out
{error, #{code := couldnt_connect}} ->
ok
end.

couldnt_resolve_host(_) ->
{error, #{code := couldnt_resolve_host,
Expand Down

0 comments on commit c829023

Please sign in to comment.