You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by va...@apache.org on 2017/07/14 16:38:11 UTC

[couchdb] 02/02: Fix flaky os daemons tests

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

vatamane pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit 789f75dcfc00cdf1d807edac59f90f705c94a4ae
Author: Nick Vatamaniuc <va...@apache.org>
AuthorDate: Fri Jul 14 11:57:29 2017 -0400

    Fix flaky os daemons tests
    
    The "should die" test was close to the edge of timing out. Daemon started up,
    slept for 1 second then died. However max_retries is 3 so the whole thing was
    happening 3 times in a row. The total wait was 4 seconds, but on slow machines
    1 extra second was not enough for the overhead of forking the 3 processes and
    other setup stuff.
    
    Set restart times to 2. Hopefully 4 seconds should be enough overhead for 2
    restarts.
    
    Also adjust sleep time for the "die quickly" test. 1 second there might not
    be enough for both restarts, so made it 2 just to be safe.
    
    Issue #675
---
 src/couch/test/couchdb_os_daemons_tests.erl | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/couch/test/couchdb_os_daemons_tests.erl b/src/couch/test/couchdb_os_daemons_tests.erl
index aba1a55..ee0462f 100644
--- a/src/couch/test/couchdb_os_daemons_tests.erl
+++ b/src/couch/test/couchdb_os_daemons_tests.erl
@@ -52,6 +52,7 @@ setup(DName) ->
     % Set configuration option to be used by configuration_reader_test_
     % This will be used in os_daemon_configer.escript:test_get_cfg2
     config:set("uuids", "algorithm","sequential", false),
+    config:set("os_daemon_settings", "max_retries", "2"),
     ensure_n_daemons_are_alive(1),
     {Ctx, OsDPid}.
 
@@ -181,7 +182,7 @@ should_fail_due_to_lack_of_permissions(DName, _) ->
     ?_test(should_halts(DName, 1000)).
 
 should_die_on_boot(DName, _) ->
-    ?_test(should_halts(DName, 1000)).
+    ?_test(should_halts(DName, 2000)).
 
 should_die_quickly(DName, _) ->
     ?_test(should_halts(DName, 4000)).

-- 
To stop receiving notification emails like this one, please contact
"commits@couchdb.apache.org" <co...@couchdb.apache.org>.