Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor and break up rt module into appropriate subdomain functions #669

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/riak_test_escript.erl
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ maybe_teardown(true, TestResults, Coverage, Verbose) ->
so_kill_riak_maybe();
_ ->
lager:info("Multiple tests run or no failure"),
rt:teardown(),
rt_cluster:teardown(),
print_summary(TestResults, Coverage, Verbose)
end,
ok.
Expand Down Expand Up @@ -293,7 +293,7 @@ run_test(Test, Outdir, TestMetaData, Report, HarnessArgs, NumTests) ->
CoverDir = rt_config:get(cover_output, "coverage"),
case NumTests of
1 -> keep_them_up;
_ -> rt:teardown()
_ -> rt_cluster:teardown()
end,
CoverageFile = rt_cover:maybe_export_coverage(Test, CoverDir, erlang:phash2(TestMetaData)),
case Report of
Expand Down Expand Up @@ -422,8 +422,8 @@ so_kill_riak_maybe() ->
io:format("Would you like to leave Riak running in order to debug?~n"),
Input = io:get_chars("[Y/n] ", 1),
case Input of
"n" -> rt:teardown();
"N" -> rt:teardown();
"n" -> rt_cluster:teardown();
"N" -> rt_cluster:teardown();
_ ->
io:format("Leaving Riak Up... "),
rt:whats_up()
Expand Down
2 changes: 1 addition & 1 deletion src/riak_test_group_leader.erl
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,4 @@ io_requests(_, Result) ->

%% If we get multiple lines, we'll split them up for lager to maximize the prettiness.
log_chars(Chars) ->
[lager:info("~s", [Line]) || Line <- string:tokens(lists:flatten(Chars), "\n")].
[lager:info("~s", [Line]) || Line <- string:tokens(lists:flatten(Chars), "\n")].
7 changes: 4 additions & 3 deletions src/riak_test_runner.erl
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ run(TestModule, Outdir, TestMetaData, HarnessArgs) ->
undefined -> [];
Value -> [{multi_config, Value}]
end,
Backend = rt:set_backend(proplists:get_value(backend, TestMetaData), BackendExtras),
Backend = rt_backend:set_backend(
proplists:get_value(backend, TestMetaData), BackendExtras),
{PropsMod, PropsFun} = function_name(properties, TestModule, 0, rt_cluster),
{SetupMod, SetupFun} = function_name(setup, TestModule, 2, rt_cluster),
{ConfirmMod, ConfirmFun} = function_name(confirm, TestModule),
Expand Down Expand Up @@ -158,7 +159,7 @@ compose_confirm_fun({ConfirmMod, ConfirmFun},
InitialResult = ConfirmMod:ConfirmFun(SetupData, MetaData),
OtherResults = [begin
ensure_all_nodes_running(Nodes),
_ = rt:upgrade(Node, UpgradeVersion),
_ = rt_node:upgrade(Node, UpgradeVersion),
_ = rt_cluster:maybe_wait_for_transfers(Nodes, WaitForTransfers),
ConfirmMod:ConfirmFun(SetupData, MetaData)
end || Node <- Nodes],
Expand All @@ -173,7 +174,7 @@ compose_confirm_fun({ConfirmMod, ConfirmFun},

ensure_all_nodes_running(Nodes) ->
[begin
ok = rt:start_and_wait(Node),
ok = rt_node:start_and_wait(Node),
ok = rt:wait_until_registered(Node, riak_core_ring_manager)
end || Node <- Nodes].

Expand Down
Loading