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 01:40:37 UTC

[couchdb] 01/01: Increase timeouts on two slow btree tests

This is an automated email from the ASF dual-hosted git repository.

kocolosk pushed a commit to branch bump-btree-test-timeouts
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit c5941bbf34fc8d3db7a2985914ba6747f6bed020
Author: Adam Kocoloski <ko...@apache.org>
AuthorDate: Sat Jul 27 21:38:33 2019 -0400

    Increase timeouts on two slow btree tests
    
    These two tests are reliably timing out on ARM hardware in Jenkins.
    They do a lot of individual btree operations so this is not entirely
    surprising. Appropriate course of action here is to raise the timeout.
---
 src/couch/test/couch_btree_tests.erl | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/couch/test/couch_btree_tests.erl b/src/couch/test/couch_btree_tests.erl
index 3c8840a..c9b791d 100644
--- a/src/couch/test/couch_btree_tests.erl
+++ b/src/couch/test/couch_btree_tests.erl
@@ -16,6 +16,7 @@
 -include_lib("couch/include/couch_db.hrl").
 
 -define(ROWS, 1000).
+-define(TIMEOUT, 60). % seconds
 
 
 setup() ->
@@ -276,7 +277,9 @@ should_add_every_odd_key_remove_every_even(KeyValues, {_, Btree}) ->
             false -> {Count + 1, Left, [X | Right]}
         end
                                             end, {0, [], []}, KeyValues),
-    ?_assert(test_add_remove(Btree1, Rem2Keys0, Rem2Keys1)).
+    {timeout, ?TIMEOUT,
+        ?_assert(test_add_remove(Btree1, Rem2Keys0, Rem2Keys1))
+    }.
 
 should_add_every_even_key_remove_every_old(KeyValues, {_, Btree}) ->
     {ok, Btree1} = couch_btree:add_remove(Btree, KeyValues, []),
@@ -286,7 +289,9 @@ should_add_every_even_key_remove_every_old(KeyValues, {_, Btree}) ->
             false -> {Count + 1, Left, [X | Right]}
         end
                                             end, {0, [], []}, KeyValues),
-    ?_assert(test_add_remove(Btree1, Rem2Keys1, Rem2Keys0)).
+    {timeout, ?TIMEOUT,
+        ?_assert(test_add_remove(Btree1, Rem2Keys1, Rem2Keys0))
+    }.
 
 
 should_reduce_without_specified_direction({_, Btree}) ->