Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

We’re showing branches in this repository, but you can also compare across forks.

base fork: basho/riak_core
base: feuerlabs-stat-combo
...
head fork: basho/riak_core
compare: adt-increase-timeout
  • 6 commits
  • 1 file changed
  • 0 commit comments
  • 1 contributor
Showing with 17 additions and 10 deletions.
  1. +17 −10 test/core_vnode_eqc.erl
27 test/core_vnode_eqc.erl
View
@@ -320,9 +320,9 @@ start_servers() ->
stop_servers() ->
%% Make sure VMaster is killed before sup as start_vnode is a cast
%% and there may be a pending request to start the vnode.
- stop_pid(whereis(mock_vnode_master)),
- stop_pid(whereis(riak_core_vnode_manager)),
- stop_pid(whereis(riak_core_vnode_sup)).
+ stop_pid(mock_vnode_master),
+ stop_pid(riak_core_vnode_manager),
+ stop_pid(riak_core_vnode_sup).
restart_master() ->
%% Call get status to make sure the riak_core_vnode_master
@@ -330,24 +330,31 @@ restart_master() ->
%% commands like neverreply are not cast on to the vnode and the
%% counters are not updated correctly.
sys:get_status(mock_vnode_master),
- stop_pid(whereis(mock_vnode_master)),
+ stop_pid(mock_vnode_master),
{ok, _VMaster} = riak_core_vnode_master:start_link(mock_vnode).
-stop_pid(undefined) ->
+stop_pid(Name) when is_atom(Name) ->
+ stop_pid(whereis(Name), Name);
+stop_pid(Pid) when is_pid(Pid) ->
+ stop_pid(Pid, Pid).
+
+stop_pid(undefined, _) ->
ok;
-stop_pid(Pid) ->
+stop_pid(Pid, Name) ->
unlink(Pid),
exit(Pid, shutdown),
- ok = wait_for_pid(Pid).
+ ok = wait_for_pid(Pid, Name).
-wait_for_pid(Pid) ->
+wait_for_pid(Pid, Name) ->
Mref = erlang:monitor(process, Pid),
receive
{'DOWN',Mref,process,_,_} ->
ok
after
- 5000 ->
- {error, didnotexit}
+ 35000 ->
+ exit(Pid, kill),
+ wait_for_pid(Pid, Name)
+ %{error, {didnotexit, Name}}
end.
%% Async work collector process - collect all messages until work requested

No commit comments for this range

Something went wrong with that request. Please try again.