1717% % cleared and the model is reset. The main goal is to advance the proxy
1818% % into interesting new states.
1919% %
20- % % This test can be run outside of riak_test while working on it.
20+ % % This test can be run outside of riak_test while working on it.
2121% % Symlink the source into a release build and run
22- % % c(proxy_overload_recovery).
22+ % % c(proxy_overload_recovery).
2323% % proxy_overload_recovery:run(300). % Run for 5 mins
2424% %
2525% % On failure you can re-run counter examples *and* print out the internal
2626% % state with the run.
27- % % proxy_overload_recovery:check().
27+ % % proxy_overload_recovery:check().
2828% %
2929% % TODO/Questions:
3030% % 1) Is there a better way to do the initialization step?
@@ -137,7 +137,7 @@ prop_proxy_recovery() ->
137137 [catch msgq_len (VPid )])
138138 end
139139 end ,
140- measure (duration , Msecs ,
140+ measure (duration , Msecs ,
141141 aggregate (with_title (" Commands" ), command_names (Cmds ),
142142 pretty_commands (? MODULE , Cmds , {H , S , Res },
143143 Res == ok ))))
@@ -173,13 +173,13 @@ precondition_common(#tstate{rt = undefined}, {call, _M, F, _A}) ->
173173precondition_common (_ , {call , _M , F , _A }) ->
174174 F /= prepare .
175175
176- % % %% Make sure we're still running what we think we're running - uncomment
176+ % % %% Make sure we're still running what we think we're running - uncomment
177177% % %% if having process death issues
178178% % invariant(#tstate{rt = undefined}) ->
179179% % true;
180180% % invariant(#tstate{rt = #rt{id = Index, ppid = PPid, vpid = VPid}}) ->
181181% % RegName = riak_core_vnode_proxy:reg_name(riak_kv_vnode, Index),
182- % % PPid = whereis(RegName), % Check process we think it is.
182+ % % PPid = whereis(RegName), % Check process we think it is.
183183% % true = is_process_alive(PPid),
184184% % true = is_process_alive(VPid),
185185% % true.
@@ -467,6 +467,17 @@ add_eqc_apps(Nodes) ->
467467 end || App <- Apps , Node <- Nodes ],
468468 ok .
469469
470+
471+ wait_for_vnode_change (VPid0 , Index ) ->
472+ {ok , VPid1 } = riak_core_vnode_manager :get_vnode_pid (Index , riak_kv_vnode ),
473+ case VPid1 of
474+ VPid0 ->
475+ timer :sleep (1 ),
476+ wait_for_vnode_change (VPid0 , Index );
477+ _ ->
478+ VPid1
479+ end .
480+
470481-else . % % no EQC
471482
472483-export ([confirm /0 ]).
@@ -476,14 +487,3 @@ confirm() ->
476487 pass .
477488
478489-endif .
479-
480-
481- wait_for_vnode_change (VPid0 , Index ) ->
482- {ok , VPid1 } = riak_core_vnode_manager :get_vnode_pid (Index , riak_kv_vnode ),
483- case VPid1 of
484- VPid0 ->
485- timer :sleep (1 ),
486- wait_for_vnode_change (VPid0 , Index );
487- _ ->
488- VPid1
489- end .
0 commit comments