25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-24 16:23:40 +01:00

Better error reporting in pubsub tests

This commit is contained in:
Paweł Chmielowski 2020-04-01 11:45:01 +02:00
parent 6c52438128
commit a5ea3fa282

View File

@ -30,6 +30,7 @@
recv_message/1, my_jid/1, send/2, recv_presence/1, recv/1]). recv_message/1, my_jid/1, send/2, recv_presence/1, recv/1]).
-include("suite.hrl"). -include("suite.hrl").
-include_lib("stdlib/include/assert.hrl").
%%%=================================================================== %%%===================================================================
%%% API %%% API
@ -187,8 +188,8 @@ test_unsubscribe(Config) ->
test_get_affiliations(Config) -> test_get_affiliations(Config) ->
Nodes = lists:sort([create_node(Config, <<>>) || _ <- lists:seq(1, 5)]), Nodes = lists:sort([create_node(Config, <<>>) || _ <- lists:seq(1, 5)]),
Affs = get_affiliations(Config), Affs = get_affiliations(Config),
Nodes = lists:sort([Node || #ps_affiliation{node = Node, ?assertEqual(Nodes, lists:sort([Node || #ps_affiliation{node = Node,
type = owner} <- Affs]), type = owner} <- Affs])),
[delete_node(Config, Node) || Node <- Nodes], [delete_node(Config, Node) || Node <- Nodes],
disconnect(Config). disconnect(Config).
@ -196,7 +197,7 @@ test_get_subscriptions(Config) ->
Nodes = lists:sort([create_node(Config, <<>>) || _ <- lists:seq(1, 5)]), Nodes = lists:sort([create_node(Config, <<>>) || _ <- lists:seq(1, 5)]),
[subscribe_node(Config, Node) || Node <- Nodes], [subscribe_node(Config, Node) || Node <- Nodes],
Subs = get_subscriptions(Config), Subs = get_subscriptions(Config),
Nodes = lists:sort([Node || #ps_subscription{node = Node} <- Subs]), ?assertEqual(Nodes, lists:sort([Node || #ps_subscription{node = Node} <- Subs])),
[delete_node(Config, Node) || Node <- Nodes], [delete_node(Config, Node) || Node <- Nodes],
disconnect(Config). disconnect(Config).