test: fix shared sub test case flaky
This commit is contained in:
parent
8d90f6f067
commit
406a2d7a52
|
@ -739,11 +739,16 @@ t_qos1_random_dispatch_if_all_members_are_down(Config) when is_list(Config) ->
|
||||||
?assert(is_process_alive(Pid2)),
|
?assert(is_process_alive(Pid2)),
|
||||||
|
|
||||||
{ok, _} = emqtt:publish(ConnPub, Topic, <<"hello11">>, 1),
|
{ok, _} = emqtt:publish(ConnPub, Topic, <<"hello11">>, 1),
|
||||||
ct:sleep(100),
|
?retry(
|
||||||
|
100,
|
||||||
|
10,
|
||||||
|
begin
|
||||||
Msgs1 = emqx_mqueue:to_list(get_mqueue(Pid1)),
|
Msgs1 = emqx_mqueue:to_list(get_mqueue(Pid1)),
|
||||||
Msgs2 = emqx_mqueue:to_list(get_mqueue(Pid2)),
|
Msgs2 = emqx_mqueue:to_list(get_mqueue(Pid2)),
|
||||||
%% assert the message is in mqueue (because socket is closed)
|
%% assert the message is in mqueue (because socket is closed)
|
||||||
?assertMatch([#message{payload = <<"hello11">>}], Msgs1 ++ Msgs2),
|
?assertMatch([#message{payload = <<"hello11">>}], Msgs1 ++ Msgs2)
|
||||||
|
end
|
||||||
|
),
|
||||||
emqtt:stop(ConnPub),
|
emqtt:stop(ConnPub),
|
||||||
ok.
|
ok.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue