diff options
| author | Simon MacMullen <simon@rabbitmq.com> | 2014-12-11 17:17:16 +0000 |
|---|---|---|
| committer | Simon MacMullen <simon@rabbitmq.com> | 2014-12-11 17:17:16 +0000 |
| commit | b20b305fa811e53b5976b32d598d3502145d4db2 (patch) | |
| tree | 0e2edde2b0530f9077ed43026b864f4e39a11790 /test/src | |
| parent | 45bf08cb52f54fcafd0db11439325620c70fa4aa (diff) | |
| parent | 5db2509f984cac384be0d94bc92b79c0bf5996fc (diff) | |
| download | rabbitmq-server-git-b20b305fa811e53b5976b32d598d3502145d4db2.tar.gz | |
Merge in default
Diffstat (limited to 'test/src')
| -rw-r--r-- | test/src/rabbit_tests.erl | 40 |
1 files changed, 25 insertions, 15 deletions
diff --git a/test/src/rabbit_tests.erl b/test/src/rabbit_tests.erl index dcbec8f606..870dfdd99a 100644 --- a/test/src/rabbit_tests.erl +++ b/test/src/rabbit_tests.erl @@ -1888,11 +1888,15 @@ test_backing_queue() -> passed = test_msg_store(), application:set_env(rabbit, msg_store_file_size_limit, FileSizeLimit), - passed = test_queue_index(), - passed = test_queue_index_props(), - passed = test_variable_queue(), - passed = test_variable_queue_delete_msg_store_files_callback(), - passed = test_queue_recover(), + [begin + application:set_env( + rabbit, queue_index_embed_msgs_below, Bytes), + passed = test_queue_index(), + passed = test_queue_index_props(), + passed = test_variable_queue(), + passed = test_variable_queue_delete_msg_store_files_callback(), + passed = test_queue_recover() + end || Bytes <- [0, 1024]], application:set_env(rabbit, queue_index_max_journal_entries, MaxJournal), %% We will have restarted the message store, and thus changed @@ -2219,7 +2223,7 @@ init_test_queue() -> fun (MsgId) -> rabbit_msg_store:contains(MsgId, PersistentClient) end, - fun nop/1), + fun nop/1, fun nop/1), ok = rabbit_msg_store:client_delete_and_terminate(PersistentClient), Res. @@ -2422,7 +2426,7 @@ variable_queue_init(Q, Recover) -> Q, case Recover of true -> non_clean_shutdown; false -> new - end, fun nop/2, fun nop/2, fun nop/1). + end, fun nop/2, fun nop/2, fun nop/1, fun nop/1). variable_queue_publish(IsPersistent, Count, VQ) -> variable_queue_publish(IsPersistent, Count, fun (_N, P) -> P end, VQ). @@ -2462,7 +2466,10 @@ variable_queue_set_ram_duration_target(Duration, VQ) -> rabbit_variable_queue:set_ram_duration_target(Duration, VQ)). assert_prop(List, Prop, Value) -> - Value = proplists:get_value(Prop, List). + case proplists:get_value(Prop, List)of + Value -> ok; + _ -> {exit, Prop, exp, Value, List} + end. assert_props(List, PropVals) -> [assert_prop(List, Prop, Value) || {Prop, Value} <- PropVals]. @@ -2485,12 +2492,18 @@ with_fresh_variable_queue(Fun) -> {delta, undefined, 0, undefined}}, {q3, 0}, {q4, 0}, {len, 0}]), - _ = rabbit_variable_queue:delete_and_terminate( - shutdown, Fun(VQ)), - Me ! Ref + try + _ = rabbit_variable_queue:delete_and_terminate( + shutdown, Fun(VQ)), + Me ! Ref + catch + Type:Error -> + Me ! {Ref, Type, Error, erlang:get_stacktrace()} + end end), receive - Ref -> ok + Ref -> ok; + {Ref, Type, Error, ST} -> exit({Type, Error, ST}) end, passed. @@ -2787,8 +2800,6 @@ test_variable_queue_dynamic_duration_change(VQ0) -> VQ7 = lists:foldl( fun (Duration1, VQ4) -> {_Duration, VQ5} = rabbit_variable_queue:ram_duration(VQ4), - io:format("~p:~n~p~n", - [Duration1, variable_queue_status(VQ5)]), VQ6 = variable_queue_set_ram_duration_target( Duration1, VQ5), publish_fetch_and_ack(Churn, Len, VQ6) @@ -2849,7 +2860,6 @@ test_variable_queue_partial_segments_delta_thing(VQ0) -> check_variable_queue_status(VQ0, Props) -> VQ1 = variable_queue_wait_for_shuffling_end(VQ0), S = variable_queue_status(VQ1), - io:format("~p~n", [S]), assert_props(S, Props), VQ1. |
