Fix bugs in test cases
This commit is contained in:
parent
ffa220a87d
commit
e56252dac6
|
@ -53,7 +53,8 @@ handle_call({start_session, ClientPid, ClientId, Zone}, _From, State) ->
|
||||||
username => undefined,
|
username => undefined,
|
||||||
expiry_interval => 0,
|
expiry_interval => 0,
|
||||||
max_inflight => 0,
|
max_inflight => 0,
|
||||||
topic_alias_maximum => 0
|
topic_alias_maximum => 0,
|
||||||
|
will_msg => undefined
|
||||||
},
|
},
|
||||||
{ok, SessPid} = emqx_sm:open_session(Attrs),
|
{ok, SessPid} = emqx_sm:open_session(Attrs),
|
||||||
{reply, {ok, SessPid},
|
{reply, {ok, SessPid},
|
||||||
|
|
|
@ -24,8 +24,15 @@ all() -> [t_open_close_session].
|
||||||
t_open_close_session(_) ->
|
t_open_close_session(_) ->
|
||||||
emqx_ct_broker_helpers:run_setup_steps(),
|
emqx_ct_broker_helpers:run_setup_steps(),
|
||||||
{ok, ClientPid} = emqx_mock_client:start_link(<<"client">>),
|
{ok, ClientPid} = emqx_mock_client:start_link(<<"client">>),
|
||||||
Attrs = #{clean_start => true, client_id => <<"client">>, conn_pid => ClientPid,
|
Attrs = #{clean_start => true,
|
||||||
zone => internal, username => <<"zhou">>, expiry_interval => 0, max_inflight => 0, topic_alias_maximum => 0},
|
client_id => <<"client">>,
|
||||||
|
conn_pid => ClientPid,
|
||||||
|
zone => internal,
|
||||||
|
username => <<"zhou">>,
|
||||||
|
expiry_interval => 0,
|
||||||
|
max_inflight => 0,
|
||||||
|
topic_alias_maximum => 0,
|
||||||
|
will_msg => undefined},
|
||||||
{ok, SPid} = emqx_sm:open_session(Attrs),
|
{ok, SPid} = emqx_sm:open_session(Attrs),
|
||||||
[{<<"client">>, SPid}] = emqx_sm:lookup_session(<<"client">>),
|
[{<<"client">>, SPid}] = emqx_sm:lookup_session(<<"client">>),
|
||||||
SPid = emqx_sm:lookup_session_pid(<<"client">>),
|
SPid = emqx_sm:lookup_session_pid(<<"client">>),
|
||||||
|
|
Loading…
Reference in New Issue