From 4eec852fe59f6f4f0dce10c30e9203c6dca9782c Mon Sep 17 00:00:00 2001 From: Joan Touzet Date: Fri, 7 Jul 2017 19:59:09 -0400 Subject: Disable compaction daemon on eunit run couch startups Commit 21f9544 enabled the compaction daemon by default. And commit 3afe3ad disabled the compaction daemon at the start of the compaction daemon tests. Unfortunately, the compaction daemon remains active during all the other EUnit tests. I attempted to override the [compactions] _default line in the file rel/files/eunit.ini but specifying `_default=` or `_default=[]` did not provide the desired behaviour. This change disables the _default config as part of `test_util:start_couch` after startup. This means there is a very brief period during which the daemon is running, but in empirical testing the only thing I've seen it manage to do is compact `_dbs` before being disabled. Tested with `make soak-eunit` for 3 hours; this seems to eliminate the `all_dbs_active` error we've been seeing in CI runs since the compaction daemon was enabled by default. --- src/couch/src/test_util.erl | 1 + 1 file changed, 1 insertion(+) diff --git a/src/couch/src/test_util.erl b/src/couch/src/test_util.erl index 1be177ad7..54fefd50e 100644 --- a/src/couch/src/test_util.erl +++ b/src/couch/src/test_util.erl @@ -72,6 +72,7 @@ start_couch(IniFiles, ExtraApps) -> load_applications_with_stats(), ok = application:set_env(config, ini_files, IniFiles), Apps = start_applications(?DEFAULT_APPS ++ ExtraApps), + ok = config:delete("compactions", "_default", false), #test_context{started = Apps}. stop_couch() -> -- cgit v1.2.1