summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Vatamaniuc <vatamane@apache.org>2021-03-12 16:12:05 -0500
committerNick Vatamaniuc <nickva@users.noreply.github.com>2021-03-12 16:51:14 -0500
commitc508efedcabd560449e4dcbd7774a04b3907257e (patch)
tree45bff30657e12e3ad12d7e830a8108b69498880e
parent304a0634a2e06fdedd0746d39984e27147391842 (diff)
downloadcouchdb-c508efedcabd560449e4dcbd7774a04b3907257e.tar.gz
Fix more couch_jobs flakiness
The errors see in #3417 seem to indicate the expiration jobs are interfering with the couch_jobs tests, to prevent that prevent expiration_db job gen_server from starting at all. Fixes #3417
-rw-r--r--src/couch_jobs/test/couch_jobs_tests.erl11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/couch_jobs/test/couch_jobs_tests.erl b/src/couch_jobs/test/couch_jobs_tests.erl
index b40e52e8a..3582c64d7 100644
--- a/src/couch_jobs/test/couch_jobs_tests.erl
+++ b/src/couch_jobs/test/couch_jobs_tests.erl
@@ -78,10 +78,21 @@ couch_jobs_basic_test_() ->
setup_couch() ->
+ % Because of a circular dependency between `couch_jobs` and `fabric` in
+ % `fabric2_db_expiration` module, disable db expiration so when
+ % `couch_jobs` is stopped the test, `fabric` app doesn't get torn down as
+ % well and we don't see spurious <<"db_expiration">> jobs show up in test
+ % results.
+ meck:new(fabric2_db_expiration, [passthrough]),
+ meck:expect(fabric2_db_expiration, handle_info, fun
+ (timeout, St) -> {noreply, St};
+ (Msg, St) -> meck:passthrough([Msg, St])
+ end),
test_util:start_couch([fabric]).
teardown_couch(Ctx) ->
+ meck:unload(),
test_util:stop_couch(Ctx).