You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ko...@apache.org on 2019/07/28 13:47:49 UTC
[couchdb] 02/04: Bump timeouts for slow reshard_api tests
This is an automated email from the ASF dual-hosted git repository.
kocolosk pushed a commit to branch jenkins-fix-eunit-timeouts
in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit 662aa14390072c85634e64a2afe7646859286c78
Author: Adam Kocoloski <ko...@apache.org>
AuthorDate: Sun Jul 28 09:42:14 2019 -0400
Bump timeouts for slow reshard_api tests
These two tests do a lot of work and could exceed the default timeout
under normal circumstances.
---
src/mem3/test/mem3_reshard_api_test.erl | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/mem3/test/mem3_reshard_api_test.erl b/src/mem3/test/mem3_reshard_api_test.erl
index 982fed1..f394308 100644
--- a/src/mem3/test/mem3_reshard_api_test.erl
+++ b/src/mem3/test/mem3_reshard_api_test.erl
@@ -27,6 +27,7 @@
-define(STATE, "_reshard/state").
-define(ID, <<"id">>).
-define(OK, <<"ok">>).
+-define(TIMEOUT, 60). % seconds
setup() ->
@@ -438,7 +439,7 @@ create_job_with_invalid_arguments({Top, {Db1, _, _}}) ->
create_job_with_db({Top, {Db1, _, _}}) ->
- ?_test(begin
+ {timeout, ?TIMEOUT, ?_test(begin
Jobs = Top ++ ?JOBS,
Body1 = #{type => split, db => Db1},
@@ -465,11 +466,11 @@ create_job_with_db({Top, {Db1, _, _}}) ->
[16#80000000, 16#bfffffff],
[16#c0000000, 16#ffffffff]
], [mem3:range(S) || S <- lists:sort(mem3:shards(Db1))])
- end).
+ end)}.
create_job_with_shard_name({Top, {_, _, Db3}}) ->
- ?_test(begin
+ {timeout, ?TIMEOUT, ?_test(begin
Jobs = Top ++ ?JOBS,
[S1, S2] = [mem3:name(S) || S <- lists:sort(mem3:shards(Db3))],
@@ -490,7 +491,7 @@ create_job_with_shard_name({Top, {_, _, Db3}}) ->
[16#80000000, 16#bfffffff],
[16#c0000000, 16#ffffffff]
], [mem3:range(S) || S <- lists:sort(mem3:shards(Db3))])
- end).
+ end)}.
completed_job_handling({Top, {Db1, _, _}}) ->