Skip to content

Commit

Permalink
Merge pull request #1646 from apache/eunit-fixes-for-partitions
Browse files Browse the repository at this point in the history
fixes for failin eunit tests
  • Loading branch information
rnewson committed Oct 8, 2018
2 parents cf124b9 + b2c858f commit 3e14644
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/fabric/src/fabric_view.erl
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,9 @@ get_shards(DbName, #mrargs{} = Args) ->
{false, true, undefined} ->
mem3:shards(DbName);
{false, true, Partition} ->
mem3:shards(DbName, Partition)
mem3:shards(DbName, Partition);
{false, undefined, _} ->
mem3:shards(DbName)
end.

% create a fake docid within the specified partition.
Expand Down
2 changes: 1 addition & 1 deletion src/fabric/src/fabric_view_all_docs.erl
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ cancel_read_pids(Pids) ->
Args = #mrargs{
start_key = null,
end_key = null,
extra = [{partitioned, true}]
extra = [{partitioned, false}]
},
meck:expect(mem3, shards, fun(<<"db">>) -> [] end),
shards(DbName, Args),
Expand Down
1 change: 1 addition & 0 deletions src/mango/src/mango_idx.erl
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,7 @@ index(SelectorName, Selector) ->
<<"Selected">>,<<"json">>,
{[{<<"fields">>,{[{<<"location">>,<<"asc">>}]}},
{SelectorName,{Selector}}]},
[],
[{<<"def">>,{[{<<"fields">>,[<<"location">>]}]}}]
}.

Expand Down

0 comments on commit 3e14644

Please sign in to comment.