Skip to content

Commit

Permalink
test:update test
Browse files Browse the repository at this point in the history
  • Loading branch information
qzhuyan committed Oct 6, 2023
1 parent d5c7654 commit 8bfb322
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions test/quicer_snb_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -893,9 +893,9 @@ tc_conn_gc(Config) ->
| default_stream_opts() ],
Options = {ListenerOpts, ConnectionOpts, StreamOpts},
ct:pal("Listener Options: ~p", [Options]),
?check_trace(#{timetrap => 1000},
?check_trace(#{timetrap => 100000},
begin
%% Spawn a process that will die without handler cleanups
%% Spawn a process that will die without handle cleanups
%% The dead process should trigger a connection close
%% The dead process should trigger a GC
{ok, _QuicApp} = quicer_start_listener(mqtt, Port, Options),
Expand Down Expand Up @@ -941,9 +941,10 @@ tc_conn_gc(Config) ->
{ok, _} = ?block_until(#{ ?snk_kind := debug
, context := "callback"
, function := "resource_conn_dealloc_callback"
, resource_id := CRid
, resource_id := 0
, tag := "end"},
5000, 1000),
timer:sleep(1000),
{SRid, CRid}
end,
fun({_SRid, CRid}, Trace) ->
Expand All @@ -961,7 +962,7 @@ tc_conn_gc(Config) ->
#{ ?snk_kind := debug
, context := "callback"
, function := "resource_conn_dealloc_callback"
, resource_id := CRid
, resource_id := 0
, tag := "end"},
Trace)),
?assert(?strict_causality(#{ ?snk_kind := debug
Expand Down Expand Up @@ -994,7 +995,7 @@ tc_conn_gc(Config) ->
),
?assertEqual(1, length([ E || #{ function := "resource_conn_dealloc_callback"
, resource_id := Rid
, tag := "end"} = E <- TraceEvents, Rid == CRid])
, tag := "end"} = E <- TraceEvents, Rid == 0])
)
end),
ct:pal("stop listener"),
Expand Down

0 comments on commit 8bfb322

Please sign in to comment.