summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmile Joubert <emile@rabbitmq.com>2011-10-24 11:39:40 +0100
committerEmile Joubert <emile@rabbitmq.com>2011-10-24 11:39:40 +0100
commit9654b49d8a95bd84d948e48ca775220ee322b773 (patch)
treec4cea14a2d076cc30c01c61722350892322b1e10
parentd6ab9e0542ae254c6805ad9fdca8a70313b55ae3 (diff)
downloadrabbitmq-server-bug24511.tar.gz
Update escript and docsbug24511
-rwxr-xr-xquickcheck9
-rw-r--r--src/rabbit_backing_queue_qc.erl5
2 files changed, 8 insertions, 6 deletions
diff --git a/quickcheck b/quickcheck
index a36cf3ed..b5382d75 100755
--- a/quickcheck
+++ b/quickcheck
@@ -6,15 +6,16 @@
%% A helper to test quickcheck properties on a running broker
%% NodeStr is a local broker node name
%% ModStr is the module containing quickcheck properties
-%% The number of trials is optional
-main([NodeStr, ModStr | TrialsStr]) ->
+%% TrialsStr is the number of trials
+main([NodeStr, ModStr, TrialsStr]) ->
{ok, Hostname} = inet:gethostname(),
Node = list_to_atom(NodeStr ++ "@" ++ Hostname),
Mod = list_to_atom(ModStr),
- Trials = lists:map(fun erlang:list_to_integer/1, TrialsStr),
+ Trials = erlang:list_to_integer(TrialsStr),
case rpc:call(Node, code, ensure_loaded, [proper]) of
{module, proper} ->
- case rpc:call(Node, proper, module, [Mod] ++ Trials) of
+ case rpc:call(Node, proper, module,
+ [Mod] ++ [[{numtests, Trials}, {constraint_tries, 200}]]) of
[] -> ok;
_ -> quit(1)
end;
diff --git a/src/rabbit_backing_queue_qc.erl b/src/rabbit_backing_queue_qc.erl
index 5cffa76d..20036c4f 100644
--- a/src/rabbit_backing_queue_qc.erl
+++ b/src/rabbit_backing_queue_qc.erl
@@ -42,7 +42,7 @@
messages, %% gb_trees of seqid => {msg_props, basic_msg}
acks, %% [{acktag, {seqid, {msg_props, basic_msg}}}]
confirms, %% set of msgid
- publishing}).%% int (induce long chain of publishes)
+ publishing}).%% int
%% Initialise model
@@ -155,6 +155,7 @@ qc_purge(#state{bqstate = BQ}) ->
%% Preconditions
+%% Create long queues by only allowing publishing
precondition(#state{publishing = Count}, {call, _Mod, Fun, _Arg})
when Count > 0, Fun /= publish ->
false;
@@ -320,7 +321,7 @@ postcondition(#state{bqstate = BQ, len = Len}, {call, _M, _F, _A}, _Res) ->
%% Helpers
-publish_multiple(C) ->
+publish_multiple(_C) ->
ok.
timeout(BQ, 0) ->