Github user kxepal commented on the pull request:
https://github.com/apache/couchdb-couch/pull/32#issuecomment-70786078
> BTW I've tried to use start_couch with [couch_mrview] extra app. It
doesn't work in this case due to complex dependencies between couch_stats,
couch_logger, couch_index and couch_mrview.
Works for me. Example change:
```diff
diff --git a/src/couch_mrview_updater.erl b/src/couch_mrview_updater.erl
index db5b5e9..81b0085 100644
--- a/src/couch_mrview_updater.erl
+++ b/src/couch_mrview_updater.erl
@@ -187,7 +187,7 @@ map_docs(Parent, State0) ->
({Id, Seq, Rev, deleted}, {SeqAcc, Results}) ->
{erlang:max(Seq, SeqAcc), [{Id, Seq, Rev, []} |
Results]};
({Id, Seq, Rev, Doc}, {SeqAcc, Results}) ->
- couch_stats:increment_counter([couchdb, mrview,
map_docs],
+ couch_stats:increment_counter([couchdb, mrview,
map_doc],
1),
{ok, Res} = couch_query_servers:map_doc_raw(QServer,
Doc),
{erlang:max(Seq, SeqAcc), [{Id, Seq, Rev, Res} |
Results]}
diff --git a/test/couch_mrview_red_views_tests.erl
b/test/couch_mrview_red_views_tests.erl
index 8c2ff47..2a07bcc 100644
--- a/test/couch_mrview_red_views_tests.erl
+++ b/test/couch_mrview_red_views_tests.erl
@@ -18,6 +18,9 @@
-define(TIMEOUT, 1000).
+start()->
+ test_util:start_couch([couch_mrview]).
+
setup() ->
{ok, Db} = couch_mrview_test_util:init_db(?tempdb(), red),
Db.
@@ -33,7 +36,7 @@ reduce_views_test_() ->
"Reduce views",
{
setup,
- fun test_util:start_couch/0, fun test_util:stop_couch/1,
+ fun start/0, fun test_util:stop_couch/1,
{
foreach,
fun setup/0, fun teardown/1,
```
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---