Permalink
Browse files

Adjust timeouts to robustify the core_vnode_eqc.erl tests

  • Loading branch information...
1 parent b251c48 commit b3f97e4dfb8e311a46b459815ee77ac8d9979c14 @slfritchie slfritchie committed Nov 14, 2012
Showing with 6 additions and 6 deletions.
  1. +2 −2 test/core_vnode_eqc.erl
  2. +4 −4 test/mock_vnode.erl
View
@@ -85,7 +85,7 @@ prop_simple() ->
aggregate(command_names(Cmds),
begin
{H,{_SN,S},Res} = run_commands(?MODULE, Cmds),
- %timer:sleep(100), %% Adjust this to make shutdown sensitive stuff pass/fail
+ timer:sleep(500), %% Adjust this to make shutdown sensitive stuff pass/fail
%% Do a sync operation on all the started vnodes
%% to ensure any of the noreply commands have executed before
%% stopping.
@@ -159,7 +159,7 @@ next_state_data(_From,_To,S=#qcst{started=Started, counters=Counters, crash_reas
%% give the vnode a chance to shut down so that the index isn't present
%% if the next command is to list the vnodes
- timer:sleep(10),
+ timer:sleep(100),
S#qcst{started=Started -- [Index],
counters=orddict:store(Index, 0, Counters),
crash_reasons=orddict:store(Index, undefined, CRs)};
View
@@ -135,7 +135,7 @@ handle_command(returnreply, _Sender, State = #state{counter=Counter}) ->
{reply, returnreply, State#state{counter = Counter + 1}};
handle_command(latereply, Sender, State = #state{counter=Counter}) ->
spawn(fun() ->
- timer:sleep(1),
+ timer:sleep(100),
riak_core_vnode:reply(Sender, latereply)
end),
{noreply, State#state{counter = Counter + 1}};
@@ -161,15 +161,15 @@ init_worker(Index, Args, Props) ->
{ok, #wstate{index=Index, args=Args, props=Props}}.
handle_work({noreply, DonePid}, {raw, Ref, _EqcPid} = _Sender, State = #wstate{index=I}) ->
- timer:sleep(1), % slow things down enough to cause issue on stops
+ timer:sleep(100), % slow things down enough to cause issue on stops
DonePid ! {I, {ok, Ref}},
{noreply, State};
handle_work({reply, DonePid}, {raw, Ref, _EqcPid} = _Sender, State = #wstate{index=I}) ->
- timer:sleep(1), % slow things down enough to cause issue on stops
+ timer:sleep(100), % slow things down enough to cause issue on stops
DonePid ! {I, {ok, Ref}},
{reply, asyncreply, State};
handle_work({crash, DonePid}, {raw, Ref, _EqcPid} = _Sender, _State = #wstate{index=I}) ->
- timer:sleep(1), % slow things down enough to cause issue on stops
+ timer:sleep(100), % slow things down enough to cause issue on stops
%DonePid ! {I, {ok, Ref}},
throw(deliberate_async_crash).

0 comments on commit b3f97e4

Please sign in to comment.