Skip to content

Commit

Permalink
squash: fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
qzhuyan committed Sep 5, 2023
1 parent 3b4680b commit 628e621
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
3 changes: 3 additions & 0 deletions test/quicer_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -642,6 +642,9 @@ run_tc_conn_client_bad_cert(Config)->
{error, stm_open_error, aborted} ->
%% Depending on the timing, connection open could fail already.
ok;
{error, stm_start_error, aborted} ->
%% Depending on the timing, connection open could fail already.
ok;
{ok, Stm} ->
case quicer:send(Stm, <<"ping">>) of
{ok, 4} -> ok;
Expand Down
12 changes: 6 additions & 6 deletions test/quicer_listener_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ tc_open_listener(Config) ->
{ok, {_, Port}} = quicer:sockname(L),
{error, eaddrinuse} = gen_udp:open(Port),
ok = quicer:close_listener(L),
{ok, P} = gen_udp:open(Port),
{ok, P} = snabbkaffe:retry(100, 10, fun()-> gen_udp:open(Port) end),
ok = gen_udp:close(P),
ok.

Expand Down Expand Up @@ -215,19 +215,19 @@ tc_open_listener_bind(Config) ->
ListenOn = "127.0.0.1:4567",
{ok, L} = quicer:listen(ListenOn, default_listen_opts(Config)),
{ok, {_, _}} = quicer:sockname(L),
{error,eaddrinuse} = gen_udp:open(4567),
{error, eaddrinuse} = gen_udp:open(4567),
ok = quicer:close_listener(L),
{ok, P} = gen_udp:open(4567),
{ok, P} = snabbkaffe:retry(100, 10, fun() -> gen_udp:open(4567) end),
ok = gen_udp:close(P),
ok.

tc_open_listener_bind_v6(Config) ->
ListenOn = "[::1]:4567",
{ok, L} = quicer:listen(ListenOn, default_listen_opts(Config)),
{ok, {_, _}} = quicer:sockname(L),
{error,eaddrinuse} = gen_udp:open(4567, [{ip, {0, 0, 0, 0, 0, 0, 0, 1}}]),
{error, eaddrinuse} = gen_udp:open(4567, [{ip, {0, 0, 0, 0, 0, 0, 0, 1}}]),
ok = quicer:close_listener(L),
{ok, P} = gen_udp:open(4567, [{ip, {0, 0, 0, 0, 0, 0, 0, 1}}]),
{ok, P} = snabbkaffe:retry(100, 10, fun() -> gen_udp:open(4567, [{ip, {0, 0, 0, 0, 0, 0, 0, 1}}]) end),
ok = gen_udp:close(P),
ok.

Expand Down Expand Up @@ -286,7 +286,7 @@ tc_stop_start_listener(Config) ->
LConf = default_listen_opts(Config),
{ok, L} = quicer:listen(Port, LConf),
ok = quicer:stop_listener(L),
ok = quicer:start_listener(L, Port, LConf),
ok = snabbkaffe:retry(100, 10, fun() -> quicer:start_listener(L, Port, LConf) end),
ok = quicer:close_listener(L).

tc_stop_close_listener(Config) ->
Expand Down

0 comments on commit 628e621

Please sign in to comment.