Permalink
Browse files

Remove gossip tests

These tests were originally written against an older version of riak
core and I couldn't see how to modify them to work with the new code.
I figure it is better to remove this code so that the other tests can
be added and this year old PR can finally be merged.
  • Loading branch information...
1 parent 926c5fa commit c6a74d597a956e0ef5b724d36b838193132342b9 @rzezeski rzezeski committed Aug 22, 2012
Showing with 0 additions and 32 deletions.
  1. +0 −32 src/riak_core_gossip.erl
@@ -44,10 +44,6 @@
-include("riak_core_ring.hrl").
--ifdef(TEST).
--include_lib("eunit/include/eunit.hrl").
--endif.
-
%% Default gossip rate: allow at most 45 gossip messages every 10 seconds
-define(DEFAULT_LIMIT, {45, 10000}).
@@ -501,31 +497,3 @@ attempt_simple_transfer(Seed, Ring, [{_, N}|Rest], TargetN, Exit, Idx, Last) ->
lists:keyreplace(N, 1, Last, {N, Idx}));
attempt_simple_transfer(_, Ring, [], _, _, _, _) ->
{ok, Ring}.
-
--ifdef(TEST).
--include_lib("eunit/include/eunit.hrl").
-
-owners(Ring) ->
- lists:usort([Owner || {_, Owner} <- riak_core_ring:all_owners(Ring)]).
-
-removal_test() ->
- application:set_env(riak_core, target_n_val, 3),
-
- Ring1 = riak_core_ring:fresh(64, n1),
- ?assertEqual([n1], owners(Ring1)),
-
- {_, Indices} = lists:foldl(fun({Idx, _}, {true, L}) ->
- {false, [Idx|L]};
- ({_, _}, {false, L}) ->
- {true, L}
- end, {true, []}, riak_core_ring:all_owners(Ring1)),
- Ring2 = lists:foldl(fun(Idx, Ring) ->
- riak_core_ring:transfer_node(Idx, n2, Ring)
- end, Ring1, Indices),
- ?assertEqual([n1, n2], owners(Ring2)),
-
- Ring3 = reassign_indices(Ring2, n2),
- ?assertEqual([n1], owners(Ring3)),
- ok.
-
--endif.

0 comments on commit c6a74d5

Please sign in to comment.