couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gar...@apache.org
Subject [couchdb] 01/01: fixes for failin eunit tests
Date Mon, 08 Oct 2018 09:23:47 GMT
This is an automated email from the ASF dual-hosted git repository.

garren pushed a commit to branch eunit-fixes-for-partitions
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit b2c858f61476516a5a4fee180fd83e203a3b899b
Author: Garren Smith <garren.smith@gmail.com>
AuthorDate: Mon Oct 8 11:23:30 2018 +0200

    fixes for failin eunit tests
---
 src/fabric/src/fabric_view.erl          | 4 +++-
 src/fabric/src/fabric_view_all_docs.erl | 2 +-
 src/mango/src/mango_idx.erl             | 1 +
 3 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/fabric/src/fabric_view.erl b/src/fabric/src/fabric_view.erl
index de374cd..85ef0f1 100644
--- a/src/fabric/src/fabric_view.erl
+++ b/src/fabric/src/fabric_view.erl
@@ -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.
diff --git a/src/fabric/src/fabric_view_all_docs.erl b/src/fabric/src/fabric_view_all_docs.erl
index e8868c5..9a37552 100644
--- a/src/fabric/src/fabric_view_all_docs.erl
+++ b/src/fabric/src/fabric_view_all_docs.erl
@@ -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),
diff --git a/src/mango/src/mango_idx.erl b/src/mango/src/mango_idx.erl
index 261e8f0..978a1b9 100644
--- a/src/mango/src/mango_idx.erl
+++ b/src/mango/src/mango_idx.erl
@@ -422,6 +422,7 @@ index(SelectorName, Selector) ->
            <<"Selected">>,<<"json">>,
            {[{<<"fields">>,{[{<<"location">>,<<"asc">>}]}},
              {SelectorName,{Selector}}]},
+           [],
            [{<<"def">>,{[{<<"fields">>,[<<"location">>]}]}}]
     }.
 


Mime
View raw message