Cleanup los processos

This commit is contained in:
Joe DeVivo 2012-12-04 14:47:32 -07:00
parent 95475cda0d
commit 81d6f89f6a

View File

@ -59,8 +59,9 @@ verify_upgrade() ->
rt:systest_write(Node1, 100, 3),
?assertEqual([], rt:systest_read(Node1, 100, 1)),
lager:info("Checking list_keys count periodically throughout this test. No news is good news :)"),
spawn_link(?MODULE, check_list_keys, [Node1]),
lager:info("Checking list_keys count periodically throughout this test."),
spawn_link(?MODULE, check_list_keys, [rt:pbc(Node1)]),
Conns = rt:connection_info(Nodes),
NodeConn = proplists:get_value(Node1, Conns),
lager:info("NodeConn: ~p", [NodeConn]),
@ -102,13 +103,17 @@ verify_upgrade() ->
%% ===================================================================
%% List Keys Tester
%% ===================================================================
check_list_keys(Node) ->
Pid = rt:pbc(Node),
check_list_keys(Pid) ->
check_list_keys(Pid, 0).
check_list_keys(Pid, Attempt) ->
case Attempt rem 1000 of
0 -> lager:debug("Performing list_keys check #~p", [Attempt]);
_ -> nothing
end,
{ok, Keys} = riakc_pb_socket:list_keys(Pid, <<"systest">>),
riakc_pb_socket:stop(Pid),
?assertEqual(100, length(Keys)),
timer:sleep(3000),
check_list_keys(Node).
check_list_keys(Pid, Attempt + 1).
%% ===================================================================
%% K/V Tester