summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon MacMullen <simon@rabbitmq.com>2011-07-21 15:13:18 +0100
committerSimon MacMullen <simon@rabbitmq.com>2011-07-21 15:13:18 +0100
commitd6e4ca3282205e8c61548da39612b4c2f4a63067 (patch)
tree242d0c5c8b970a0604d1ec7fc14431c8d094d717
parent7443cb1a84d207cf36b69da853ecc87b37a08113 (diff)
downloadrabbitmq-server-d6e4ca3282205e8c61548da39612b4c2f4a63067.tar.gz
Dialyser points out I was returning the wrong thing here. Oops.
-rw-r--r--src/mirrored_supervisor.erl2
-rw-r--r--src/mirrored_supervisor_tests.erl8
2 files changed, 5 insertions, 5 deletions
diff --git a/src/mirrored_supervisor.erl b/src/mirrored_supervisor.erl
index b927cf72..ee27d5bd 100644
--- a/src/mirrored_supervisor.erl
+++ b/src/mirrored_supervisor.erl
@@ -377,7 +377,7 @@ tell_all_peers_to_die(Group, Reason) ->
maybe_start(Delegate, ChildSpec) ->
case mnesia:transaction(fun() -> check_start(Delegate, ChildSpec) end) of
{atomic, start} -> start(Delegate, ChildSpec);
- {atomic, Pid} -> {already_started, Pid};
+ {atomic, Pid} -> {error, {already_started, Pid}};
%% If we are torn down while in the transaction...
{aborted, E} -> {error, E}
end.
diff --git a/src/mirrored_supervisor_tests.erl b/src/mirrored_supervisor_tests.erl
index 6d9ea0a0..48ef45b8 100644
--- a/src/mirrored_supervisor_tests.erl
+++ b/src/mirrored_supervisor_tests.erl
@@ -70,8 +70,8 @@ test_migrate_twice() ->
test_already_there() ->
with_sups(fun([_, _]) ->
S = childspec(worker),
- {ok, Pid} = ?MS:start_child(a, S),
- {already_started, Pid} = ?MS:start_child(b, S)
+ {ok, Pid} = ?MS:start_child(a, S),
+ {error, {already_started, Pid}} = ?MS:start_child(b, S)
end, [a, b]).
%% Deleting and restarting should work as per a normal supervisor
@@ -137,8 +137,8 @@ test_no_migration_on_shutdown() ->
test_start_idempotence() ->
with_sups(fun([_]) ->
CS = childspec(worker),
- {ok, Pid} = ?MS:start_child(a, CS),
- {already_started, Pid} = ?MS:start_child(a, CS)
+ {ok, Pid} = ?MS:start_child(a, CS),
+ {error, {already_started, Pid}} = ?MS:start_child(a, CS)
end, [a]).
%% ---------------------------------------------------------------------------