diff options
author | Nick Vatamaniuc <vatamane@apache.org> | 2017-07-14 11:57:29 -0400 |
---|---|---|
committer | Nick Vatamaniuc <nickva@users.noreply.github.com> | 2017-07-14 12:38:06 -0400 |
commit | 789f75dcfc00cdf1d807edac59f90f705c94a4ae (patch) | |
tree | d7d51947df17165361ea32c6d40f238be17f7277 | |
parent | d5a0d99c98a275b245d1e65e7a7790449d9a7fc1 (diff) | |
download | couchdb-789f75dcfc00cdf1d807edac59f90f705c94a4ae.tar.gz |
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
-rw-r--r-- | src/couch/test/couchdb_os_daemons_tests.erl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/couch/test/couchdb_os_daemons_tests.erl b/src/couch/test/couchdb_os_daemons_tests.erl index aba1a55e0..ee0462f6f 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)). |