Merge pull request #13459 from savonarola/0712-reduce-flackyness

chore(mgmt): reduce test flakyness
This commit is contained in:
Ilia Averianov 2024-07-12 13:14:14 +03:00 committed by GitHub
commit 82e723bd18
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 14 additions and 6 deletions

View File

@ -1562,17 +1562,25 @@ t_bulk_subscribe(Config) ->
Topic = <<"testtopic">>,
BulkSub = [#{topic => Topic, qos => 1, nl => 1, rh => 1}],
?assertMatch({200, [_]}, bulk_subscribe_request(ClientId1, Config, BulkSub)),
?retry(
100,
5,
?assertMatch(
{200, [_]},
get_subscriptions_request(ClientId1, Config, #{simplify_result => true})
)
),
{ok, _} = emqtt:publish(C2, Topic, <<"hi1">>, [{qos, 1}]),
?assertReceive({publish, #{topic := Topic, payload := <<"hi1">>}}),
BulkUnsub = [#{topic => Topic}],
?assertMatch({204, _}, bulk_unsubscribe_request(ClientId1, Config, BulkUnsub)),
?retry(
100,
5,
?assertMatch(
{200, []},
get_subscriptions_request(ClientId1, Config, #{simplify_result => true})
)
),
{ok, _} = emqtt:publish(C2, Topic, <<"hi2">>, [{qos, 1}]),
?assertNotReceive({publish, _}),