summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Watson <tim@rabbitmq.com>2014-01-29 10:54:33 +0000
committerTim Watson <tim@rabbitmq.com>2014-01-29 10:54:33 +0000
commit1d425b899a2a65d09f973be50f3f80b53cf6a89e (patch)
tree673472ee3a3aecc400c22665de1c6f6108c3784f
parente723f80e7e0ecbadec6be3afe7bd7598e340d4a1 (diff)
downloadrabbitmq-server-git-1d425b899a2a65d09f973be50f3f80b53cf6a89e.tar.gz
Cosmetic (ish)
-rw-r--r--src/rabbit_tests.erl52
1 files changed, 26 insertions, 26 deletions
diff --git a/src/rabbit_tests.erl b/src/rabbit_tests.erl
index 2ab93d55af..d2c87c3ece 100644
--- a/src/rabbit_tests.erl
+++ b/src/rabbit_tests.erl
@@ -157,30 +157,6 @@ test_version_equivalance() ->
false = rabbit_misc:version_minor_equivalent("3.0.0", "3.0.foo"),
passed.
-test_gs2_multi_call() ->
- Fun = fun() ->
- receive
- {'$gen_call', {From, Mref}, request} ->
- From ! {Mref, response}
- end,
- receive
- never -> ok
- end
- end,
- Pid1 = spawn(Fun),
- Pid2 = spawn(Fun),
- Pid3 = spawn(Fun),
- exit(Pid2, bang),
- {Results, Errors} = gen_server2:mcall([{Pid1, request},
- {Pid2, request},
- {Pid3, request}]),
- true =
- lists:sort([{Pid1, response}, {Pid3, response}]) == lists:sort(Results),
- true = [{Pid2, noproc}] == Errors,
- exit(Pid1, bang),
- exit(Pid3, bang),
- passed.
-
test_rabbit_basic_header_handling() ->
passed = write_table_with_invalid_existing_type_test(),
passed = invalid_existing_headers_test(),
@@ -1373,6 +1349,30 @@ test_with_state() ->
fun (S) -> element(1, S) end),
passed.
+test_gs2_multi_call() ->
+ Fun = fun() ->
+ receive
+ {'$gen_call', {From, Mref}, request} ->
+ From ! {Mref, response}
+ end,
+ receive
+ never -> ok
+ end
+ end,
+ Pid1 = spawn(Fun),
+ Pid2 = spawn(Fun),
+ Pid3 = spawn(Fun),
+ exit(Pid2, bang),
+ {Results, Errors} = gen_server2:mcall([{Pid1, request},
+ {Pid2, request},
+ {Pid3, request}]),
+ true =
+ lists:sort([{Pid1, response}, {Pid3, response}]) == lists:sort(Results),
+ true = [{Pid2, noproc}] == Errors,
+ exit(Pid1, bang),
+ exit(Pid3, bang),
+ passed.
+
test_mcall() ->
Pids1 = [spawn_link(fun gs2_test_listener/0) || _ <- lists:seq(1, 5)],
Pids2 = [spawn_link(fun() ->
@@ -1387,8 +1387,8 @@ test_mcall() ->
true = lists:sort(Replies) == lists:sort([{Pid, goodbye} || Pid <- Pids]),
true = lists:sort(Errors) ==
lists:sort([{Pid, boom} || Pid <- BadPids1] ++
- [{{nonode@nohost,bar},nodedown},
- {{global,foo},unknown_name}]),
+ [{{global,foo},unknown_name},
+ {{nonode@nohost,bar},nodedown}]),
passed.
gs2_test_crasher() ->