You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ji...@apache.org on 2020/01/09 15:54:11 UTC

[couchdb] 01/01: Address flaky test failure on t_invalid_view/1

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

jiangphcn pushed a commit to branch address-flaky-t_invalid_view
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit e7e86dabd855b6f465a7314a667e4a31e32832b2
Author: jiangph <ji...@cn.ibm.com>
AuthorDate: Thu Jan 9 23:51:11 2020 +0800

    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
---
 src/smoosh/src/smoosh_server.erl | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/smoosh/src/smoosh_server.erl b/src/smoosh/src/smoosh_server.erl
index 7af1e4e..f9c5210 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">>,