nickva commented on code in PR #4662:
URL: https://github.com/apache/couchdb/pull/4662#discussion_r1308837673
##########
src/mango/src/mango_idx.erl:
##########
@@ -479,7 +500,186 @@ get_legacy_selector(Def) ->
end.
-ifdef(TEST).
--include_lib("eunit/include/eunit.hrl").
+-include_lib("couch/include/couch_eunit.hrl").
+
+get_usable_indexes_test_() ->
+ {
+ foreach,
+ fun() ->
+ meck:new(fabric_util),
+ meck:new(ddoc_cache),
+ meck:new(mango_idx_special),
+ meck:new(mango_idx_view),
+ meck:new(mango_sort),
+ meck:new(mango_cursor)
Review Comment:
Hmm that is interesting. I had tried it with a simple example in the shell
to confirm but perhaps something else is going on here. If there is no other
way, let's keep the `new`s in place. Not worth spending too much time on it.
```
% asf/src/meck (tags/0.9.2) % erl -pa ebin/*
2> meck:expect(diameter, start, 0, mecked).
ok
3> diameter:start().
mecked
4> meck:unload().
[diameter]
5> diameter:start().
ok
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]