summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjiangph <jiangph@cn.ibm.com>2020-01-09 23:51:11 +0800
committerPaul J. Davis <paul.joseph.davis@gmail.com>2020-01-09 11:48:31 -0600
commit628e7578e659daa600d93bcad2c5c8a4d5f6e94c (patch)
tree56e977e0ece239b9abfa589dee2057dec0962536
parentfe12bd89d1e4fdc101985c70918119b6897c2c52 (diff)
downloadcouchdb-628e7578e659daa600d93bcad2c5c8a4d5f6e94c.tar.gz
Address flaky test failure on t_invalid_view/1
- Start couch_log to make sure that couch_log_server proc exists and write log instead of getting noproc error during test
-rw-r--r--src/smoosh/src/smoosh_server.erl9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/smoosh/src/smoosh_server.erl b/src/smoosh/src/smoosh_server.erl
index 7af1e4eef..f9c5210db 100644
--- a/src/smoosh/src/smoosh_server.erl
+++ b/src/smoosh/src/smoosh_server.erl
@@ -447,13 +447,16 @@ needs_upgrade(Props) ->
setup_all() ->
+ Ctx = test_util:start_couch([couch_log]),
meck:new([config, couch_index, couch_index_server], [passthrough]),
Pid = list_to_pid("<0.0.0>"),
meck:expect(couch_index_server, get_index, 3, {ok, Pid}),
- meck:expect(config, get, fun(_, _, Default) -> Default end).
+ meck:expect(config, get, fun(_, _, Default) -> Default end),
+ Ctx.
-teardown_all(_) ->
- meck:unload().
+teardown_all(Ctx) ->
+ meck:unload(),
+ test_util:stop_couch(Ctx).
setup() ->
Shard = <<"shards/00000000-1fffffff/test.1529510412">>,