summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJean-Sébastien Pédron <jean-sebastien@rabbitmq.com>2017-06-21 11:56:51 +0200
committerJean-Sébastien Pédron <jean-sebastien@rabbitmq.com>2017-06-21 11:56:51 +0200
commitce98122454f6897be0753e2938e8f59a533dbc93 (patch)
treef54df863c2e9236d0b52cd4c354a256d4ea88573 /test
parent72415b1c9446db5ad38b7d70a45fec6942682ec0 (diff)
parentc253b4201c5d65a4346cc95ef3636d334ad7d87b (diff)
downloadrabbitmq-server-git-ce98122454f6897be0753e2938e8f59a533dbc93.tar.gz
Merge branch 'stable'
Diffstat (limited to 'test')
-rw-r--r--test/term_to_binary_compat_prop_SUITE.erl22
1 files changed, 14 insertions, 8 deletions
diff --git a/test/term_to_binary_compat_prop_SUITE.erl b/test/term_to_binary_compat_prop_SUITE.erl
index 6c8a92a29f..69aa63433d 100644
--- a/test/term_to_binary_compat_prop_SUITE.erl
+++ b/test/term_to_binary_compat_prop_SUITE.erl
@@ -23,6 +23,8 @@
-include_lib("common_test/include/ct.hrl").
-include_lib("proper/include/proper.hrl").
+-define(ITERATIONS_TO_RUN_UNTIL_CONFIDENT, 10000).
+
all() ->
[
pre_3_6_11_works,
@@ -48,20 +50,22 @@ init_per_testcase(Testcase, Config) ->
%% If this test fails - the erlang version is not supported in
%% RabbitMQ-3.6.10 and earlier.
pre_3_6_11_works(Config) ->
- Fun = fun () -> prop_pre_3_6_11_works(Config) end,
- rabbit_ct_proper_helpers:run_proper(Fun, [], 50000).
+ Property = fun () -> prop_pre_3_6_11_works(Config) end,
+ rabbit_ct_proper_helpers:run_proper(Property, [],
+ ?ITERATIONS_TO_RUN_UNTIL_CONFIDENT).
prop_pre_3_6_11_works(_Config) ->
?FORALL(Term, any(),
begin
Current = term_to_binary(Term),
Compat = term_to_binary_compat:term_to_binary_1(Term),
- Current =:= Compat
+ binary_to_term(Current) =:= binary_to_term(Compat)
end).
term_to_binary_latin_atom(Config) ->
- Fun = fun () -> prop_term_to_binary_latin_atom(Config) end,
- rabbit_ct_proper_helpers:run_proper(Fun, [], 10000).
+ Property = fun () -> prop_term_to_binary_latin_atom(Config) end,
+ rabbit_ct_proper_helpers:run_proper(Property, [],
+ ?ITERATIONS_TO_RUN_UNTIL_CONFIDENT).
prop_term_to_binary_latin_atom(_Config) ->
?FORALL(LatinString, list(integer(0, 255)),
@@ -69,12 +73,14 @@ prop_term_to_binary_latin_atom(_Config) ->
Length = length(LatinString),
Atom = list_to_atom(LatinString),
Binary = list_to_binary(LatinString),
- <<131,100, Length:16, Binary/binary>> =:= term_to_binary_compat:term_to_binary_1(Atom)
+ <<131,100, Length:16, Binary/binary>> =:=
+ term_to_binary_compat:term_to_binary_1(Atom)
end).
queue_name_to_binary(Config) ->
- Fun = fun () -> prop_queue_name_to_binary(Config) end,
- rabbit_ct_proper_helpers:run_proper(Fun, [], 10000).
+ Property = fun () -> prop_queue_name_to_binary(Config) end,
+ rabbit_ct_proper_helpers:run_proper(Property, [],
+ ?ITERATIONS_TO_RUN_UNTIL_CONFIDENT).
prop_queue_name_to_binary(_Config) ->