fix(persistent_session): Make sure the connection processs is dead
This commit is contained in:
parent
ed0f435546
commit
12639addb9
|
@ -147,6 +147,9 @@ end_per_group(persistent_store_enabled, _Config) ->
|
||||||
end_per_group(persistent_store_disabled, _Config) ->
|
end_per_group(persistent_store_disabled, _Config) ->
|
||||||
meck:unload(emqx_config),
|
meck:unload(emqx_config),
|
||||||
emqx_common_test_helpers:stop_apps([]);
|
emqx_common_test_helpers:stop_apps([]);
|
||||||
|
end_per_group(quic, _Config) ->
|
||||||
|
application:stop(quicer),
|
||||||
|
ok;
|
||||||
end_per_group(_Group, _Config) ->
|
end_per_group(_Group, _Config) ->
|
||||||
ok.
|
ok.
|
||||||
|
|
||||||
|
@ -222,8 +225,11 @@ maybe_kill_connection_process(ClientId, Config) ->
|
||||||
true ->
|
true ->
|
||||||
[ConnectionPid] = emqx_cm:lookup_channels(ClientId),
|
[ConnectionPid] = emqx_cm:lookup_channels(ClientId),
|
||||||
?assert(is_pid(ConnectionPid)),
|
?assert(is_pid(ConnectionPid)),
|
||||||
|
Ref = monitor(process, ConnectionPid),
|
||||||
ConnectionPid ! die_if_test,
|
ConnectionPid ! die_if_test,
|
||||||
ok;
|
receive {'DOWN', Ref, process, ConnectionPid, normal} -> ok
|
||||||
|
after 3000 -> error(process_did_not_die)
|
||||||
|
end;
|
||||||
false ->
|
false ->
|
||||||
ok
|
ok
|
||||||
end.
|
end.
|
||||||
|
@ -715,7 +721,6 @@ t_snabbkaffe_pending_messages(Config) ->
|
||||||
ok = emqtt:disconnect(Client1),
|
ok = emqtt:disconnect(Client1),
|
||||||
maybe_kill_connection_process(ClientId, Config),
|
maybe_kill_connection_process(ClientId, Config),
|
||||||
|
|
||||||
|
|
||||||
?check_trace(
|
?check_trace(
|
||||||
begin
|
begin
|
||||||
snabbkaffe_sync_publish(Topic, Payloads, Config),
|
snabbkaffe_sync_publish(Topic, Payloads, Config),
|
||||||
|
|
Loading…
Reference in New Issue