summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMichael Klishin <michael@clojurewerkz.org>2017-09-20 20:56:24 -0600
committerLuke Bakken <lbakken@pivotal.io>2017-09-22 11:23:33 -0700
commitba1df05f1c2361ba9983b9775d7b5fb51508e7a5 (patch)
treeb247fa23c61b9377910b763300336519437705c4 /test
parentece1c99c2d53c8efd03bfde949ce1c2b13234c05 (diff)
downloadrabbitmq-server-git-ba1df05f1c2361ba9983b9775d7b5fb51508e7a5.tar.gz
Use EUnit assertions here
They produce more informative match failure reports.
Diffstat (limited to 'test')
-rw-r--r--test/queue_master_location_SUITE.erl12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/queue_master_location_SUITE.erl b/test/queue_master_location_SUITE.erl
index babde31e9e..8bd19639d9 100644
--- a/test/queue_master_location_SUITE.erl
+++ b/test/queue_master_location_SUITE.erl
@@ -34,6 +34,7 @@
-include_lib("common_test/include/ct.hrl").
-include_lib("amqp_client/include/amqp_client.hrl").
+-include_lib("eunit/include/eunit.hrl").
-compile(export_all).
@@ -251,21 +252,20 @@ declare(Config, QueueName, Durable, AutoDelete, Args, Owner) ->
verify_min_master(Config, Q) ->
Node = rabbit_ct_broker_helpers:get_node_config(Config, 0, nodename),
MinMaster = min_master_node(Config),
- ct:pal("Expecting min master ~p~n", [MinMaster]),
- {ok, MinMaster} = rpc:call(Node, rabbit_queue_master_location_misc,
- lookup_master, [Q, ?DEFAULT_VHOST_PATH]).
+ ?assertEqual({ok, MinMaster}, rpc:call(Node, rabbit_queue_master_location_misc,
+ lookup_master, [Q, ?DEFAULT_VHOST_PATH])).
verify_random(Config, Q) ->
[Node | _] = Nodes = rabbit_ct_broker_helpers:get_node_configs(Config,
nodename),
{ok, Master} = rpc:call(Node, rabbit_queue_master_location_misc,
lookup_master, [Q, ?DEFAULT_VHOST_PATH]),
- true = lists:member(Master, Nodes).
+ ?assert(lists:member(Master, Nodes)).
verify_client_local(Config, Q) ->
Node = rabbit_ct_broker_helpers:get_node_config(Config, 0, nodename),
- {ok, Node} = rpc:call(Node, rabbit_queue_master_location_misc,
- lookup_master, [Q, ?DEFAULT_VHOST_PATH]).
+ ?assertEqual({ok, Node}, rpc:call(Node, rabbit_queue_master_location_misc,
+ lookup_master, [Q, ?DEFAULT_VHOST_PATH])).
set_location_policy(Config, Name, Strategy) ->
ok = rabbit_ct_broker_helpers:set_policy(Config, 0,