mirror of
https://github.com/valitydev/riak_test.git
synced 2024-11-06 16:45:29 +00:00
8d3d29af2f
Change uses of rtdev:upgrade to the new rt:upgrade Update tests to use Riak 1.1.4 not 1.1.2
28 lines
760 B
Erlang
28 lines
760 B
Erlang
-module(upgrade).
|
|
-export([upgrade/0]).
|
|
-include_lib("eunit/include/eunit.hrl").
|
|
|
|
upgrade() ->
|
|
Nodes = rt:build_cluster(["1.0.3", "1.0.3", "1.1.4", current]),
|
|
[Node1, Node2, Node3, _Node4] = Nodes,
|
|
|
|
lager:info("Writing 100 keys"),
|
|
rt:systest_write(Node1, 100, 3),
|
|
?assertEqual([], rt:systest_read(Node1, 100, 1)),
|
|
rt:upgrade(Node1, current),
|
|
lager:info("Ensuring keys still exist"),
|
|
rt:stop(Node2),
|
|
rt:stop(Node3),
|
|
rt:systest_read(Node1, 100, 1),
|
|
%% ?assertEqual([], rt:systest_read(Node1, 100, 1)),
|
|
wait_until_readable(Node1, 100),
|
|
ok.
|
|
|
|
wait_until_readable(Node, N) ->
|
|
rt:wait_until(Node,
|
|
fun(_) ->
|
|
[] == rt:systest_read(Node, N, 1)
|
|
end).
|
|
|
|
|