From a5ea3fa28279c3058aed2a0205cb517a925b6014 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Chmielowski?= Date: Wed, 1 Apr 2020 11:45:01 +0200 Subject: [PATCH] Better error reporting in pubsub tests --- test/pubsub_tests.erl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/pubsub_tests.erl b/test/pubsub_tests.erl index 48ba3e849..af66a9f48 100644 --- a/test/pubsub_tests.erl +++ b/test/pubsub_tests.erl @@ -30,6 +30,7 @@ recv_message/1, my_jid/1, send/2, recv_presence/1, recv/1]). -include("suite.hrl"). +-include_lib("stdlib/include/assert.hrl"). %%%=================================================================== %%% API @@ -187,8 +188,8 @@ test_unsubscribe(Config) -> test_get_affiliations(Config) -> Nodes = lists:sort([create_node(Config, <<>>) || _ <- lists:seq(1, 5)]), Affs = get_affiliations(Config), - Nodes = lists:sort([Node || #ps_affiliation{node = Node, - type = owner} <- Affs]), + ?assertEqual(Nodes, lists:sort([Node || #ps_affiliation{node = Node, + type = owner} <- Affs])), [delete_node(Config, Node) || Node <- Nodes], disconnect(Config). @@ -196,7 +197,7 @@ test_get_subscriptions(Config) -> Nodes = lists:sort([create_node(Config, <<>>) || _ <- lists:seq(1, 5)]), [subscribe_node(Config, Node) || Node <- Nodes], 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], disconnect(Config).