This is an automated email from the ASF dual-hosted git repository. garren pushed a commit to branch fdb-mango-indexes in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit 5ee7f81f7951169537544dcab4a3f4fec8efda2a Author: Jay Doane <[email protected]> AuthorDate: Wed Feb 12 00:22:24 2020 -0800 Fix failing test getting 500 expecting 503 06-basic-text-test.py", line 27, in test_create_text_index assert resp.status_code == 503, resp AssertionError: <Response [500]> --- src/mango/src/mango_idx.erl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/mango/src/mango_idx.erl b/src/mango/src/mango_idx.erl index 501d8ef..a1bbe0a 100644 --- a/src/mango/src/mango_idx.erl +++ b/src/mango/src/mango_idx.erl @@ -372,7 +372,7 @@ get_idx_def(Opts) -> get_idx_type(Opts) -> case proplists:get_value(type, Opts) of <<"json">> -> <<"json">>; - <<"text">> -> case clouseau_rpc:connected() of + <<"text">> -> case is_text_service_available() of true -> <<"text">>; false -> @@ -385,6 +385,11 @@ get_idx_type(Opts) -> end. +is_text_service_available() -> + erlang:function_exported(clouseau_rpc, connected, 0) andalso + clouseau_rpc:connected(). + + get_idx_ddoc(Idx, Opts) -> case proplists:get_value(ddoc, Opts) of <<"_design/", _Rest/binary>> = Name ->
