mirror of
https://github.com/valitydev/riak_test.git
synced 2024-11-06 16:45:29 +00:00
Merge pull request #930 from basho/dr/check_vnode_for_liveliness
Updated to attempt to make sure we get the "right" vnode PID.
This commit is contained in:
commit
5c2c474d47
@ -215,6 +215,10 @@ prepare(ThresholdSeed) ->
|
||||
ok = supervisor:terminate_child(riak_core_vnode_proxy_sup, {riak_kv_vnode, Id}),
|
||||
RegName = riak_core_vnode_proxy:reg_name(riak_kv_vnode, Index),
|
||||
undefined = whereis(RegName),
|
||||
%% Fail if we get back the dead vnode
|
||||
{ok, VPid1} = riak_core_vnode_manager:get_vnode_pid(Index, riak_kv_vnode),
|
||||
?assertNotEqual(VPid1, VPid0),
|
||||
|
||||
{ok, PPid} = supervisor:restart_child(riak_core_vnode_proxy_sup, {riak_kv_vnode, Id}),
|
||||
|
||||
%% Find the proxy pid and check it's alive and matches the supervisor
|
||||
@ -225,6 +229,7 @@ prepare(ThresholdSeed) ->
|
||||
%% and return the Pid so we know we have the same Pid.
|
||||
{ok, VPid} = riak_core_vnode_proxy:command_return_vnode(
|
||||
{riak_kv_vnode,Index,node()}, timeout),
|
||||
?assertEqual(VPid, VPid1),
|
||||
|
||||
true = is_process_alive(PPid),
|
||||
true = is_process_alive(VPid),
|
||||
|
Loading…
Reference in New Issue
Block a user