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/29 01:23:48 UTC
[couchdb] 04/05: Increase timeouts on more heavyweight mem3 tests
This is an automated email from the ASF dual-hosted git repository.
kocolosk pushed a commit to branch fix-eunit-timeouts
in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit 6f694d7c6193329cd239ae1a27b6a6df773bab9c
Author: Adam Kocoloski <ko...@apache.org>
AuthorDate: Sun Jul 28 12:39:47 2019 -0400
Increase timeouts on more heavyweight mem3 tests
---
src/mem3/test/mem3_reshard_api_test.erl | 4 ++--
src/mem3/test/mem3_reshard_changes_feed_test.erl | 9 +++++----
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/src/mem3/test/mem3_reshard_api_test.erl b/src/mem3/test/mem3_reshard_api_test.erl
index 2c941fd..c4df24a 100644
--- a/src/mem3/test/mem3_reshard_api_test.erl
+++ b/src/mem3/test/mem3_reshard_api_test.erl
@@ -645,7 +645,7 @@ recover_in_source_delete({Top, {Db1, _, _}}) ->
check_max_jobs({Top, {Db1, Db2, _}}) ->
- ?_test(begin
+ {timeout, ?TIMEOUT, ?_test(begin
Jobs = Top ++ ?JOBS,
config:set("reshard", "max_jobs", "0", _Persist=false),
@@ -679,7 +679,7 @@ check_max_jobs({Top, {Db1, Db2, _}}) ->
% Jobs that have been created already are not removed if max jobs is lowered
% so make sure the job completes
wait_to_complete(Top, R4)
- end).
+ end)}.
check_node_and_range_required_params({Top, {Db1, _, _}}) ->
diff --git a/src/mem3/test/mem3_reshard_changes_feed_test.erl b/src/mem3/test/mem3_reshard_changes_feed_test.erl
index 52e18fb..4b9e2a3 100644
--- a/src/mem3/test/mem3_reshard_changes_feed_test.erl
+++ b/src/mem3/test/mem3_reshard_changes_feed_test.erl
@@ -17,6 +17,7 @@
-include_lib("couch/include/couch_db.hrl").
-include_lib("mem3/src/mem3_reshard.hrl").
+-define(TIMEOUT, 60). % seconds
-define(assertChanges(Expected, Received),
begin
@@ -66,7 +67,7 @@ mem3_reshard_changes_feed_test_() ->
normal_feed_should_work_after_split(#{db1 := Db}) ->
- ?_test(begin
+ {timeout, ?TIMEOUT, ?_test(begin
DocSpec = #{
docs => [1, 10],
delete => [5, 6]
@@ -141,11 +142,11 @@ normal_feed_should_work_after_split(#{db1 := Db}) ->
?assertEqual(4, length(Changes7)),
[#{seq := Seq7} | _] = Changes7,
?assertEqual(EndSeq7, Seq7)
- end).
+ end)}.
continuous_feed_should_work_during_split(#{db1 := Db}) ->
- ?_test(begin
+ {timeout, ?TIMEOUT, ?_test(begin
{UpdaterPid, UpdaterRef} = spawn_monitor(fun() ->
Updater = fun U({State, I}) ->
receive
@@ -233,7 +234,7 @@ continuous_feed_should_work_during_split(#{db1 := Db}) ->
DocIDs = [Id || #{id := Id} <- StopChanges ++ AfterChanges],
ExpectedDocIDs = [doc_id(<<>>, N) || N <- lists:seq(1, DocCount)],
?assertEqual(ExpectedDocIDs, lists:usort(DocIDs))
- end).
+ end)}.
split_and_wait(Db) ->