Skip to content

Commit c829023

Browse files
committed
Special-case timeout test for http2
1 parent a157b49 commit c829023

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

test/katipo_SUITE.erl

+7-2
Original file line numberDiff line numberDiff line change
@@ -580,8 +580,13 @@ proxy_couldnt_connect(_) ->
580580

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

586591
couldnt_resolve_host(_) ->
587592
{error, #{code := couldnt_resolve_host,

0 commit comments

Comments
 (0)