diff options
| author | Matthew Sackman <matthew@rabbitmq.com> | 2010-12-20 16:54:49 +0000 |
|---|---|---|
| committer | Matthew Sackman <matthew@rabbitmq.com> | 2010-12-20 16:54:49 +0000 |
| commit | 84938e5f421b26b66c38f2d5a5efbcdf90208599 (patch) | |
| tree | 8ec8fe006038d983110d0f7b15d9a5fe7c324ff2 /src | |
| parent | 5beb2aa5d34dec6cfe1bc994112a9d76dbc12840 (diff) | |
| download | rabbitmq-server-git-84938e5f421b26b66c38f2d5a5efbcdf90208599.tar.gz | |
Test the badnodes case
Diffstat (limited to 'src')
| -rw-r--r-- | src/rabbit_tests.erl | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/rabbit_tests.erl b/src/rabbit_tests.erl index adf968cbe9..4f7a1e0cf6 100644 --- a/src/rabbit_tests.erl +++ b/src/rabbit_tests.erl @@ -1247,15 +1247,25 @@ test_delegates_sync(SecondaryNode) -> true = lists:all(fun ({_, response}) -> true end, GoodRes), GoodResPids = [Pid || {Pid, _} <- GoodRes], - Good = ordsets:from_list(LocalGoodPids ++ RemoteGoodPids), - Good = ordsets:from_list(GoodResPids), + Good = lists:usort(LocalGoodPids ++ RemoteGoodPids), + Good = lists:usort(GoodResPids), {[], BadRes} = delegate:invoke(LocalBadPids ++ RemoteBadPids, BadSender), true = lists:all(fun ({_, {exit, exception, _}}) -> true end, BadRes), BadResPids = [Pid || {Pid, _} <- BadRes], - Bad = ordsets:from_list(LocalBadPids ++ RemoteBadPids), - Bad = ordsets:from_list(BadResPids), + Bad = lists:usort(LocalBadPids ++ RemoteBadPids), + Bad = lists:usort(BadResPids), + + MagicalPids = [rabbit_misc:string_to_pid(Str) || + Str <- ["<nohost.1.0>", "<nohost.2.0>"]], + {[], BadNodes} = delegate:invoke(MagicalPids, Sender), + true = lists:all(fun ({_, {exit, {nodedown, nohost}, []}}) -> true end, + BadNodes), + BadNodesPids = [Pid || {Pid, _} <- BadNodes], + + Magical = lists:usort(MagicalPids), + Magical = lists:usort(BadNodesPids), passed. |
