diff options
| -rw-r--r-- | src/mirrored_supervisor.erl | 2 | ||||
| -rw-r--r-- | src/mirrored_supervisor_tests.erl | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/mirrored_supervisor.erl b/src/mirrored_supervisor.erl index b927cf72de..ee27d5bdfb 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 6d9ea0a0ba..48ef45b8dc 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]). %% --------------------------------------------------------------------------- |
