Skip to content

Commit

Permalink
made eleveldb the only possible backend
Browse files Browse the repository at this point in the history
  • Loading branch information
korry8911 committed Jan 9, 2017
1 parent ea40742 commit abe8ab3
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions tests/ts_cluster_aae.erl
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,8 @@ acc_preflists(Pl, PlCounts) ->
end, PlCounts, Pl).

test_data_ts(Start, End) ->
ts_data:get_valid_select_data(fun() -> lists:seq(Start, End) end).
StepSize = 1000*60*5,
ts_data:get_valid_select_data(fun() -> lists:seq(1 + StepSize*Start, 1 + StepSize*End, StepSize) end).

key_ts(Data) ->
lists:sublist(tuple_to_list(Data), 3).
Expand All @@ -159,7 +160,6 @@ write_data_ts(Node, KVs, Table) ->
write_data_ts(Node, KVs, Table, []).

write_data_ts(Node, KVs, Table, _Opts) ->
%PB = rt:pbc(Node),
[begin
O =
case ts_ops:get([Node], Table, key_ts(TS_Data_Tuple)) of
Expand All @@ -170,7 +170,6 @@ write_data_ts(Node, KVs, Table, _Opts) ->
end,
?assertMatch(ok, ts_ops:put([Node], Table, O))
end || TS_Data_Tuple <- KVs],
%riakc_pb_socket:stop(PB),
ok.

% @doc Verifies that the data is eventually restored to the expected set.
Expand Down Expand Up @@ -324,11 +323,7 @@ wipe_out_aae_data(Node, Partition) ->
rt:clean_data_dir(Node, "anti_entropy/"++integer_to_list(Partition)),
ok.

base_dir_for_backend(undefined) ->
base_dir_for_backend(bitcask);
base_dir_for_backend(bitcask) ->
"bitcask";
base_dir_for_backend(eleveldb) ->
base_dir_for_backend() ->
"leveldb".

restart_vnode(Node, Service, Partition) ->
Expand All @@ -352,9 +347,7 @@ restart_vnode(Node, Service, Partition) ->
[Partition, NewPid]).

dir_for_partition(Partition) ->
TestMetaData = riak_test_runner:metadata(),
KVBackend = proplists:get_value(backend, TestMetaData),
BaseDir = base_dir_for_backend(KVBackend),
BaseDir = base_dir_for_backend(),
filename:join([BaseDir, integer_to_list(Partition)]).

% @doc True if the AAE stats report zero data repairs for last exchange
Expand Down Expand Up @@ -398,4 +391,14 @@ all_hashtrees_upgraded(Node) when is_atom(Node) ->
_ ->
false
end.
get_trees_version, []),
case [Idx || {Idx, undefined} <- Trees] of
[] ->
true;
_ ->
false
end;
_ ->
false
end.

0 comments on commit abe8ab3

Please sign in to comment.