test(flaky_tests): fix persistent_session_SUITE

Increase timeout on message receive and ensure more info when the test fails.
This commit is contained in:
Tobias Lindahl 2021-12-06 10:42:19 +01:00
parent 68a7c096b0
commit 366c757959
1 changed files with 2 additions and 2 deletions

View File

@ -245,7 +245,7 @@ receive_messages(Count, Msgs) ->
receive_messages(Count-1, [Msg|Msgs]);
_Other ->
receive_messages(Count, Msgs)
after 1000 ->
after 5000 ->
Msgs
end.
@ -576,7 +576,7 @@ t_publish_while_client_is_gone(Config) ->
| Config]),
{ok, _} = emqtt:ConnFun(Client2),
Msgs = receive_messages(2),
?assertEqual(length(Msgs), 2),
?assertMatch([_, _], Msgs),
[Msg2, Msg1] = Msgs,
?assertEqual({ok, iolist_to_binary(Payload1)}, maps:find(payload, Msg1)),
?assertEqual({ok, 2}, maps:find(qos, Msg1)),