summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Kuryloski <kuryloskip@vmware.com>2020-06-04 15:12:18 +0200
committerPhilip Kuryloski <kuryloskip@vmware.com>2020-06-09 09:48:20 +0200
commit94370dde79d4921858c63b1b3bd3f4263690acf8 (patch)
tree16a6e2bbe5e91b172b8fc46eddf4fd062ebd08c9
parenta74639c305173da50a472b289d42d3c461bc1909 (diff)
downloadrabbitmq-server-git-94370dde79d4921858c63b1b3bd3f4263690acf8.tar.gz
Replace connection_metric_idemp_test with specific cases
rather than a property based test. The property test flakes occassionally, and without consistent input values. Idempotency should be properly demonstrated with 2 or more attempts at the action anyway.
-rw-r--r--test/metrics_SUITE.erl10
1 files changed, 7 insertions, 3 deletions
diff --git a/test/metrics_SUITE.erl b/test/metrics_SUITE.erl
index f3e5cac5bb..2d0ed5b2d4 100644
--- a/test/metrics_SUITE.erl
+++ b/test/metrics_SUITE.erl
@@ -103,7 +103,9 @@ queue_metric_count_channel_per_queue_test(Config) ->
[Config], 5).
connection_metric_idemp_test(Config) ->
- rabbit_ct_proper_helpers:run_proper(fun prop_connection_metric_idemp/1, [Config], 25).
+ connection_metric_idemp(Config, {1, 1}),
+ connection_metric_idemp(Config, {1, 2}),
+ connection_metric_idemp(Config, {2, 2}).
channel_metric_idemp_test(Config) ->
rabbit_ct_proper_helpers:run_proper(fun prop_channel_metric_idemp/1, [Config], 25).
@@ -150,8 +152,10 @@ connection_metric_idemp(Config, {N, R}) ->
TableAfter = [ Pid || {Pid, _} <- read_table_rpc(Config, connection_metrics)],
TableAfter2 = [ Pid || {Pid, _} <- read_table_rpc(Config, connection_coarse_metrics)],
[rabbit_ct_client_helpers:close_connection(Conn) || Conn <- Conns],
- (Table2 == TableAfter2) and (Table == TableAfter) and
- (N == length(Table)) and (N == length(TableAfter)).
+ ?assertEqual(Table, TableAfter),
+ ?assertEqual(Table2, TableAfter2),
+ ?assertEqual(N, length(Table)),
+ ?assertEqual(N, length(TableAfter)).
channel_metric_idemp(Config, {N, R}) ->
Conn = rabbit_ct_client_helpers:open_unmanaged_connection(Config),