Skip to content

Commit

Permalink
test: add a start listener sync
Browse files Browse the repository at this point in the history
MsQuic 2.2 looks slow to start listener
  • Loading branch information
qzhuyan committed Sep 5, 2023
1 parent 8aff2a7 commit 357cf0f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/quicer_snb_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -1701,8 +1701,10 @@ tc_conn_stop_notify_acceptor(Config) ->
ct:pal("Listener Options: ~p", [Options]),
?check_trace(#{timetrap => 10000},
begin
Parent = self(),
{SPid, Ref} = spawn_monitor(fun() ->
{ok, Listener} = quicer:listen(Port, ListenerOpts),
Parent ! {self(), ready},
{ok, Conn} = quicer:accept(Listener, []),
Acceptors = lists:map(fun(_) ->
spawn(quicer, accept_stream, [Conn, []])
Expand All @@ -1714,6 +1716,7 @@ tc_conn_stop_notify_acceptor(Config) ->
end,
exit({normal, Acceptors})
end),
receive {SPid, ready} -> ok end,
{ok, Conn} = quicer:connect("localhost", Port, default_conn_opts(), infinity),
quicer:shutdown_connection(Conn),

Expand Down

0 comments on commit 357cf0f

Please sign in to comment.