diff options
| author | Emile Joubert <emile@rabbitmq.com> | 2011-10-24 11:39:40 +0100 |
|---|---|---|
| committer | Emile Joubert <emile@rabbitmq.com> | 2011-10-24 11:39:40 +0100 |
| commit | 2cef73fa13b632c611dd52b18a365ebe1849fef3 (patch) | |
| tree | c4cea14a2d076cc30c01c61722350892322b1e10 | |
| parent | 31fb2a346f5165fad369a37ee93d09a86a2347a0 (diff) | |
| download | rabbitmq-server-git-2cef73fa13b632c611dd52b18a365ebe1849fef3.tar.gz | |
Update escript and docs
| -rwxr-xr-x | quickcheck | 9 | ||||
| -rw-r--r-- | src/rabbit_backing_queue_qc.erl | 5 |
2 files changed, 8 insertions, 6 deletions
diff --git a/quickcheck b/quickcheck index a36cf3ed86..b5382d75b9 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 5cffa76d00..20036c4f45 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) -> |
