jaydoane commented on a change in pull request #1605: Feature/user partitioned
databases
URL: https://github.com/apache/couchdb/pull/1605#discussion_r223536556
##########
File path: src/fabric/src/fabric_view_all_docs.erl
##########
@@ -316,3 +316,89 @@ cancel_read_pids(Pids) ->
{empty, _} ->
ok
end.
+
+-ifdef(TEST).
+
+-include_lib("eunit/include/eunit.hrl").
+
+ shards_for_partition_gets_partitioned_shards_test() ->
+ DbName = <<"db">>,
+ Args = #mrargs{
+ start_key = <<"pk:id">>,
+ end_key = <<"pk:idZ">>,
+ extra = [{partitioned, true}]
+ },
+ meck:expect(mem3, shards, fun(<<"db">>, <<"pk:foo">>) -> [] end),
+ shards(DbName, Args),
+ meck:validate(mem3),
+ meck:unload(mem3).
Review comment:
Again, I think meck use should be protected in a `teardown` to ensure it
doesn't bleed into subsequently run tests.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services