parent
9b17757ae8
commit
f0107868d4
|
@ -345,11 +345,13 @@ t_connected_client_count_persistent(Config) when is_list(Config) ->
|
|||
fun() -> emqtt:ConnFun(ConnPid0) end,
|
||||
[emqx_cm_connected_client_count_inc]
|
||||
),
|
||||
timer:sleep(10),
|
||||
?assertEqual(1, emqx_cm:get_connected_client_count()),
|
||||
{ok, {ok, [_]}} = wait_for_events(
|
||||
fun() -> emqtt:disconnect(ConnPid0) end,
|
||||
[emqx_cm_connected_client_count_dec]
|
||||
),
|
||||
timer:sleep(10),
|
||||
?assertEqual(0, emqx_cm:get_connected_client_count()),
|
||||
%% reconnecting
|
||||
{ok, ConnPid1} = emqtt:start_link([ {clean_start, false}
|
||||
|
|
|
@ -413,6 +413,7 @@ t_persist_on_disconnect(Config) ->
|
|||
{properties, #{'Session-Expiry-Interval' => 30}}
|
||||
| Config]),
|
||||
{ok, _} = emqtt:ConnFun(Client2),
|
||||
timer:sleep(10),
|
||||
%% The session should not be known, since it wasn't persisted because of the
|
||||
%% changed expiry interval in the disconnect call.
|
||||
?assertEqual(0, client_info(session_present, Client2)),
|
||||
|
@ -492,7 +493,8 @@ t_process_dies_session_expires(Config) ->
|
|||
%% The session should be a fresh one
|
||||
{persistent, NewSession} = emqx_persistent_session:lookup(ClientId),
|
||||
?assertNotEqual(SessionId, emqx_session:info(id, NewSession)),
|
||||
%% The old session should now either be marked as abandoned or already be garbage collected.
|
||||
%% The old session should now either
|
||||
%% be marked as abandoned or already be garbage collected.
|
||||
?assertMatch([], emqx_persistent_session:pending(SessionId));
|
||||
false ->
|
||||
skip
|
||||
|
|
Loading…
Reference in New Issue