Add tests for replication of deletes for fullsync

This commit is contained in:
Nick Marino 2016-05-04 15:44:05 -04:00
parent 8daebc1663
commit ffd45d0009

View File

@ -371,6 +371,7 @@ difference_test() ->
[LeaderA, "B"]),
lager:info("Fullsync completed in ~p seconds", [Time1/1000/1000]),
lager:info("Checking that object was replicated to cluster B"),
%% Read key from after fullsync.
{ok, O1} = riakc_pb_socket:get(BPBC, <<"foo">>, <<"bar">>,
[{timeout, 4000}]),
@ -388,11 +389,22 @@ difference_test() ->
[LeaderA, "B"]),
lager:info("Fullsync completed in ~p seconds", [Time2/1000/1000]),
lager:info("Checking that sibling data was replicated to cluster B"),
%% Read key from after fullsync.
{ok, O2} = riakc_pb_socket:get(BPBC, <<"foo">>, <<"bar">>,
[{timeout, 4000}]),
?assertEqual([<<"baz">>, <<"baz2">>], lists:sort(riakc_obj:get_values(O2))),
ok = riakc_pb_socket:delete(APBC, <<"foo">>, <<"bar">>, [{timeout, 4000}]),
{Time3, _} = timer:tc(repl_util,
start_and_wait_until_fullsync_complete,
[LeaderA, "B"]),
lager:info("Fullsync completed in ~p seconds", [Time3/1000/1000]),
lager:info("Checking that deletion was replicated to cluster B"),
{error, notfound} = riakc_pb_socket:get(BPBC, <<"foo">>, <<"bar">>, [{timeout, 4000}]),
rt:clean_cluster(Nodes),
pass.