test(persistent_session_SUITE): protect against non-atom sinks
This commit is contained in:
parent
e62b094f3b
commit
6ed3dbd39b
|
|
@ -768,7 +768,7 @@ t_lost_messages_because_of_gc(Config) ->
|
||||||
|
|
||||||
check_snabbkaffe_vanilla(Trace) ->
|
check_snabbkaffe_vanilla(Trace) ->
|
||||||
ResumeTrace = [T || #{?snk_kind := K} = T <- Trace,
|
ResumeTrace = [T || #{?snk_kind := K} = T <- Trace,
|
||||||
re:run(atom_to_list(K), "^ps_") /= nomatch],
|
re:run(to_list(K), "^ps_") /= nomatch],
|
||||||
?assertMatch([_|_], ResumeTrace),
|
?assertMatch([_|_], ResumeTrace),
|
||||||
[_Sid] = lists:usort(?projection(sid, ResumeTrace)),
|
[_Sid] = lists:usort(?projection(sid, ResumeTrace)),
|
||||||
%% Check internal flow of the emqx_cm resuming
|
%% Check internal flow of the emqx_cm resuming
|
||||||
|
|
@ -811,6 +811,10 @@ check_snabbkaffe_vanilla(Trace) ->
|
||||||
[Markers] = ?projection(markers, ?of_kind(ps_node_markers, Trace)),
|
[Markers] = ?projection(markers, ?of_kind(ps_node_markers, Trace)),
|
||||||
?assertMatch([_], Markers).
|
?assertMatch([_], Markers).
|
||||||
|
|
||||||
|
to_list(L) when is_list(L) -> L;
|
||||||
|
to_list(A) when is_atom(A) -> atom_to_list(A);
|
||||||
|
to_list(B) when is_binary(B) -> binary_to_list(B).
|
||||||
|
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
%% Snabbkaffe tests
|
%% Snabbkaffe tests
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue