You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ch...@apache.org on 2014/08/28 19:27:39 UTC

[17/22] couch-mrview commit: updated refs/heads/1963-eunit-bigcouch to cc9c436

Switch to using test_util:{start,stop}_couch


Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/commit/1d110e14
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/tree/1d110e14
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/diff/1d110e14

Branch: refs/heads/1963-eunit-bigcouch
Commit: 1d110e14b99c0292cd09523ccec408e31a1b41e5
Parents: 7857cf8
Author: Russell Branca <ch...@apache.org>
Authored: Wed Aug 27 17:40:00 2014 -0700
Committer: Russell Branca <ch...@apache.org>
Committed: Thu Aug 28 10:27:05 2014 -0700

----------------------------------------------------------------------
 test/couch_mrview_all_docs_tests.erl   | 15 +--------------
 test/couch_mrview_collation_tests.erl  | 16 +---------------
 test/couch_mrview_compact_tests.erl    | 16 +---------------
 test/couch_mrview_index_info_tests.erl | 16 +---------------
 test/couch_mrview_map_views_tests.erl  | 16 +---------------
 test/couch_mrview_red_views_tests.erl  | 16 +---------------
 6 files changed, 6 insertions(+), 89 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/blob/1d110e14/test/couch_mrview_all_docs_tests.erl
----------------------------------------------------------------------
diff --git a/test/couch_mrview_all_docs_tests.erl b/test/couch_mrview_all_docs_tests.erl
index 0b40587..0f32d59 100644
--- a/test/couch_mrview_all_docs_tests.erl
+++ b/test/couch_mrview_all_docs_tests.erl
@@ -18,19 +18,6 @@
 -define(TIMEOUT, 1000).
 
 
-start() ->
-    {ok, Pid} = couch_server_sup:start_link(?CONFIG_CHAIN),
-    Pid.
-
-stop(Pid) ->
-    erlang:monitor(process, Pid),
-    couch_server_sup:stop(),
-    receive
-        {'DOWN', _, _, Pid, _} ->
-            ok
-    after ?TIMEOUT ->
-        throw({timeout, server_stop})
-    end.
 
 setup() ->
     {ok, Db} = couch_mrview_test_util:init_db(?tempdb(), map),
@@ -47,7 +34,7 @@ all_docs_test_() ->
         "_all_docs view tests",
         {
             setup,
-            fun start/0, fun stop/1,
+            fun test_util:start_couch/0, fun test_util:stop_couch/1,
             {
                 foreach,
                 fun setup/0, fun teardown/1,

http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/blob/1d110e14/test/couch_mrview_collation_tests.erl
----------------------------------------------------------------------
diff --git a/test/couch_mrview_collation_tests.erl b/test/couch_mrview_collation_tests.erl
index ae0d821..2ea6d6b 100644
--- a/test/couch_mrview_collation_tests.erl
+++ b/test/couch_mrview_collation_tests.erl
@@ -50,20 +50,6 @@
 ]).
 
 
-start() ->
-    {ok, Pid} = couch_server_sup:start_link(?CONFIG_CHAIN),
-    Pid.
-
-stop(Pid) ->
-    erlang:monitor(process, Pid),
-    couch_server_sup:stop(),
-    receive
-        {'DOWN', _, _, Pid, _} ->
-            ok
-    after ?TIMEOUT ->
-        throw({timeout, server_stop})
-    end.
-
 setup() ->
     {ok, Db1} = couch_mrview_test_util:new_db(?tempdb(), map),
     {ok, Db2} = couch_mrview_test_util:save_docs(Db1, make_docs()),
@@ -80,7 +66,7 @@ collation_test_() ->
         "Collation tests",
         {
             setup,
-            fun start/0, fun stop/1,
+            fun test_util:start_couch/0, fun test_util:stop_couch/1,
             {
                 foreach,
                 fun setup/0, fun teardown/1,

http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/blob/1d110e14/test/couch_mrview_compact_tests.erl
----------------------------------------------------------------------
diff --git a/test/couch_mrview_compact_tests.erl b/test/couch_mrview_compact_tests.erl
index 4085d4f..385dc3b 100644
--- a/test/couch_mrview_compact_tests.erl
+++ b/test/couch_mrview_compact_tests.erl
@@ -18,20 +18,6 @@
 -define(TIMEOUT, 1000).
 
 
-start() ->
-    {ok, Pid} = couch_server_sup:start_link(?CONFIG_CHAIN),
-    Pid.
-
-stop(Pid) ->
-    erlang:monitor(process, Pid),
-    couch_server_sup:stop(),
-    receive
-        {'DOWN', _, _, Pid, _} ->
-            ok
-    after ?TIMEOUT ->
-        throw({timeout, server_stop})
-    end.
-
 setup() ->
     {ok, Db} = couch_mrview_test_util:init_db(?tempdb(), map, 1000),
     Db.
@@ -47,7 +33,7 @@ compaction_test_() ->
         "Compaction tests",
         {
             setup,
-            fun start/0, fun stop/1,
+            fun test_util:start_couch/0, fun test_util:stop_couch/1,
             {
                 foreach,
                 fun setup/0, fun teardown/1,

http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/blob/1d110e14/test/couch_mrview_index_info_tests.erl
----------------------------------------------------------------------
diff --git a/test/couch_mrview_index_info_tests.erl b/test/couch_mrview_index_info_tests.erl
index 7afb196..3dd049d 100644
--- a/test/couch_mrview_index_info_tests.erl
+++ b/test/couch_mrview_index_info_tests.erl
@@ -18,20 +18,6 @@
 -define(TIMEOUT, 1000).
 
 
-start() ->
-    {ok, Pid} = couch_server_sup:start_link(?CONFIG_CHAIN),
-    Pid.
-
-stop(Pid) ->
-    erlang:monitor(process, Pid),
-    couch_server_sup:stop(),
-    receive
-        {'DOWN', _, _, Pid, _} ->
-            ok
-    after ?TIMEOUT ->
-        throw({timeout, server_stop})
-    end.
-
 setup() ->
     {ok, Db} = couch_mrview_test_util:init_db(?tempdb(), map),
     couch_mrview:query_view(Db, <<"_design/bar">>, <<"baz">>),
@@ -49,7 +35,7 @@ view_info_test_() ->
         "Views index tests",
         {
             setup,
-            fun start/0, fun stop/1,
+            fun test_util:start_couch/0, fun test_util:stop_couch/1,
             {
                 foreach,
                 fun setup/0, fun teardown/1,

http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/blob/1d110e14/test/couch_mrview_map_views_tests.erl
----------------------------------------------------------------------
diff --git a/test/couch_mrview_map_views_tests.erl b/test/couch_mrview_map_views_tests.erl
index 3dc373f..fe3b8f4 100644
--- a/test/couch_mrview_map_views_tests.erl
+++ b/test/couch_mrview_map_views_tests.erl
@@ -18,20 +18,6 @@
 -define(TIMEOUT, 1000).
 
 
-start() ->
-    {ok, Pid} = couch_server_sup:start_link(?CONFIG_CHAIN),
-    Pid.
-
-stop(Pid) ->
-    erlang:monitor(process, Pid),
-    couch_server_sup:stop(),
-    receive
-        {'DOWN', _, _, Pid, _} ->
-            ok
-    after ?TIMEOUT ->
-        throw({timeout, server_stop})
-    end.
-
 setup() ->
     {ok, Db} = couch_mrview_test_util:init_db(?tempdb(), map),
     Db.
@@ -47,7 +33,7 @@ map_views_test_() ->
         "Map views",
         {
             setup,
-            fun start/0, fun stop/1,
+            fun test_util:start_couch/0, fun test_util:stop_couch/1,
             {
                 foreach,
                 fun setup/0, fun teardown/1,

http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/blob/1d110e14/test/couch_mrview_red_views_tests.erl
----------------------------------------------------------------------
diff --git a/test/couch_mrview_red_views_tests.erl b/test/couch_mrview_red_views_tests.erl
index 10f0fe3..8c2ff47 100644
--- a/test/couch_mrview_red_views_tests.erl
+++ b/test/couch_mrview_red_views_tests.erl
@@ -18,20 +18,6 @@
 -define(TIMEOUT, 1000).
 
 
-start() ->
-    {ok, Pid} = couch_server_sup:start_link(?CONFIG_CHAIN),
-    Pid.
-
-stop(Pid) ->
-    erlang:monitor(process, Pid),
-    couch_server_sup:stop(),
-    receive
-        {'DOWN', _, _, Pid, _} ->
-            ok
-    after ?TIMEOUT ->
-        throw({timeout, server_stop})
-    end.
-
 setup() ->
     {ok, Db} = couch_mrview_test_util:init_db(?tempdb(), red),
     Db.
@@ -47,7 +33,7 @@ reduce_views_test_() ->
         "Reduce views",
         {
             setup,
-            fun start/0, fun stop/1,
+            fun test_util:start_couch/0, fun test_util:stop_couch/1,
             {
                 foreach,
                 fun setup/0, fun teardown/1,