diff options
| author | Simon MacMullen <simon@rabbitmq.com> | 2011-07-06 11:25:07 +0100 |
|---|---|---|
| committer | Simon MacMullen <simon@rabbitmq.com> | 2011-07-06 11:25:07 +0100 |
| commit | dbf3594e3d34e3b35404061b68ce2cca5e1cbe5f (patch) | |
| tree | 770286dabe268e3c7b34144ba542bc6b4a53dc49 /src | |
| parent | abe71e312544dd6af2b3b5d99a4d6453f10e46ad (diff) | |
| download | rabbitmq-server-git-dbf3594e3d34e3b35404061b68ce2cca5e1cbe5f.tar.gz | |
Dialyser points out that pid_of/1 was returning the wrong thing, hence some tests were passing incorrectly. Fix dubious test.
Diffstat (limited to 'src')
| -rw-r--r-- | src/mirrored_supervisor_tests.erl | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mirrored_supervisor_tests.erl b/src/mirrored_supervisor_tests.erl index fd3d71990d..00a6d690e1 100644 --- a/src/mirrored_supervisor_tests.erl +++ b/src/mirrored_supervisor_tests.erl @@ -74,11 +74,12 @@ test_delete_restart() -> with_sups(fun([_, _]) -> S = childspec(worker), {ok, Pid1} = mirrored_supervisor:start_child(a, S), - mirrored_supervisor:terminate_child(a, worker), - mirrored_supervisor:delete_child(a, worker), + ok = mirrored_supervisor:terminate_child(a, worker), + ok = mirrored_supervisor:delete_child(a, worker), {ok, Pid2} = mirrored_supervisor:start_child(b, S), false = (Pid1 =:= Pid2), - mirrored_supervisor:restart_child(a, worker), + ok = mirrored_supervisor:terminate_child(b, worker), + {ok, Pid3} = mirrored_supervisor:restart_child(b, worker), Pid3 = pid_of(worker), false = (Pid2 =:= Pid3) end, [a, b]). @@ -147,7 +148,7 @@ start_gs(Id) -> pid_of(Id) -> {received, Pid, ping} = call(Id, ping), - {ok, Pid}. + Pid. call(Id, Msg) -> call(Id, Msg, 100, 10). |
