Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fix overload test time outs #328

Merged
merged 1 commit into from

2 participants

@engelsanchez
Collaborator

Testing slow vnodes tends to time out, so upping the eunit timeout
values.
The gen:call was timing out with its 5 second default instead of obeying
the eunit test timeout, so it was changed to infinity.

@engelsanchez engelsanchez Fix overload test time outs
Testing slow vnodes tends to time out, so upping the eunit timeout
values.
The gen:call was timing out with its 5 second default instead of obeying
the eunit test timeout, so it was changed to infinity.
ce46f67
@russelldb
Owner

Looks sane, test passes for me from the console, weird meck error is I run just that test from rebar, which I'm digging into. But I get that on master too, so +1

@russelldb
Owner

Oh, finally got it running. Who knows what was up before. +1 all round!

@engelsanchez engelsanchez merged commit 861b617 into master

1 check passed

Details default The Travis CI build passed
@engelsanchez engelsanchez deleted the eas-fix-overload-test-timeouts branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 28, 2013
  1. @engelsanchez

    Fix overload test time outs

    engelsanchez authored
    Testing slow vnodes tends to time out, so upping the eunit timeout
    values.
    The gen:call was timing out with its 5 second default instead of obeying
    the eunit test timeout, so it was changed to infinity.
This page is out of date. Refresh to see the latest.
Showing with 8 additions and 8 deletions.
  1. +8 −8 src/riak_core_vnode_proxy.erl
View
16 src/riak_core_vnode_proxy.erl
@@ -336,7 +336,7 @@ fake_loop_block() ->
end.
overload_test_() ->
- {foreach,
+ {timeout, 900, {foreach,
fun() ->
VnodePid = spawn(fun fake_loop/0),
meck:new(riak_core_vnode_manager, [passthrough]),
@@ -355,11 +355,11 @@ overload_test_() ->
end,
[
fun({VnodePid, ProxyPid}) ->
- {"should not discard in normal operation",
+ {"should not discard in normal operation", timeout, 60,
fun() ->
[ProxyPid ! hello || _ <- lists:seq(1, 50000)],
%% synchronize on the mailbox
- Reply = gen:call(ProxyPid, '$vnode_proxy_call', sync),
+ Reply = gen:call(ProxyPid, '$vnode_proxy_call', sync, infinity),
?assertEqual({ok, ok}, Reply),
VnodePid ! {get_count, self()},
receive
@@ -371,12 +371,12 @@ overload_test_() ->
}
end,
fun({VnodePid, ProxyPid}) ->
- {"should discard during overflow",
+ {"should discard during overflow", timeout, 60,
fun() ->
VnodePid ! block,
[ProxyPid ! hello || _ <- lists:seq(1, 50000)],
%% synchronize on the mailbox
- Reply = gen:call(ProxyPid, '$vnode_proxy_call', sync),
+ Reply = gen:call(ProxyPid, '$vnode_proxy_call', sync, infinity),
?assertEqual({ok, ok}, Reply),
VnodePid ! unblock,
VnodePid ! {get_count, self()},
@@ -389,12 +389,12 @@ overload_test_() ->
}
end,
fun({VnodePid, ProxyPid}) ->
- {"should tolerate slow vnodes",
+ {"should tolerate slow vnodes", timeout, 60,
fun() ->
VnodePid ! slow,
[ProxyPid ! hello || _ <- lists:seq(1, 50000)],
%% synchronize on the mailbox
- Reply = gen:call(ProxyPid, '$vnode_proxy_call', sync),
+ Reply = gen:call(ProxyPid, '$vnode_proxy_call', sync, infinity),
?assertEqual({ok, ok}, Reply),
%% check that the outstanding message count is
%% reasonable
@@ -405,5 +405,5 @@ overload_test_() ->
end
}
end
- ]}.
+ ]}}.
-endif.
Something went wrong with that request. Please try again.