Use wait_for and actually check the results of riak-admin cluster join

to ensure we've really joined the cluster before we continue the test.
This commit is contained in:
Doug Rohrer 2015-08-26 13:36:30 -04:00
parent c00dabd443
commit 9c2db4b148

View File

@ -121,7 +121,11 @@ n(Atom) ->
stage_join(Node, OtherNode) -> stage_join(Node, OtherNode) ->
%% rpc:call(Node, riak_kv_console, staged_join, [[n(OtherNode)]]). %% rpc:call(Node, riak_kv_console, staged_join, [[n(OtherNode)]]).
rt:admin(Node, ["cluster", "join", n(OtherNode)]). JoinFun = fun() ->
{ok, Result} = rt:admin(Node, ["cluster", "join", n(OtherNode)]),
lists:prefix("Success:", Result)
end,
rt:wait_until(JoinFun, 5, 1000).
stage_leave(Node, OtherNode) -> stage_leave(Node, OtherNode) ->
%% rpc:call(Node, riak_core_console, stage_leave, [[n(OtherNode)]]). %% rpc:call(Node, riak_core_console, stage_leave, [[n(OtherNode)]]).