You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by da...@apache.org on 2014/02/13 00:29:11 UTC

[16/25] couch-mrview commit: updated refs/heads/1994-merge-rcouch to 7775266

start and stop the application correctly


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/5c5c5cf2
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/tree/5c5c5cf2
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/diff/5c5c5cf2

Branch: refs/heads/1994-merge-rcouch
Commit: 5c5c5cf2336061c97f1646a3cf4cb798ae178fe3
Parents: 0ce0e96
Author: benoitc <be...@apache.org>
Authored: Mon Jan 13 22:30:39 2014 +0100
Committer: Paul J. Davis <pa...@gmail.com>
Committed: Wed Feb 12 17:27:39 2014 -0600

----------------------------------------------------------------------
 test/02-map-views.t    | 7 +++----
 test/03-red-views.t    | 5 +++--
 test/04-index-info.t   | 6 ++----
 test/05-collation.t    | 4 ++--
 test/06-all-docs.t     | 4 ++--
 test/07-compact-swap.t | 5 +++--
 6 files changed, 15 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/blob/5c5c5cf2/test/02-map-views.t
----------------------------------------------------------------------
diff --git a/test/02-map-views.t b/test/02-map-views.t
index 3b55462..4f87193 100644
--- a/test/02-map-views.t
+++ b/test/02-map-views.t
@@ -15,8 +15,6 @@
 % the License.
 
 main(_) ->
-    test_util:init_code_path(),
-
     etap:plan(6),
     case (catch test()) of
         ok ->
@@ -29,8 +27,8 @@ main(_) ->
     ok.
 
 test() ->
-    couch_server_sup:start_link(test_util:config_files()),
-    couch_httpd_sup:start_link(),
+    test_util:start_couch(),
+
     {ok, Db} = couch_mrview_test_util:init_db(<<"foo">>, map),
 
     test_basic(Db),
@@ -40,6 +38,7 @@ test() ->
     test_include_docs(Db),
     test_empty_view(Db),
 
+    test_util:stop_couch(),
     ok.
 
 

http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/blob/5c5c5cf2/test/03-red-views.t
----------------------------------------------------------------------
diff --git a/test/03-red-views.t b/test/03-red-views.t
index 9491882..594fdfd 100644
--- a/test/03-red-views.t
+++ b/test/03-red-views.t
@@ -19,8 +19,8 @@ main(_) ->
     test_util:run(4, fun() -> test() end).
 
 test() ->
-    couch_server_sup:start_link(test_util:config_files()),
-    couch_httpd_sup:start_link(),
+    test_util:start_couch(),
+
     {ok, Db} = couch_mrview_test_util:init_db(<<"foo">>, red),
 
     test_basic(Db),
@@ -28,6 +28,7 @@ test() ->
     test_group_level(Db),
     test_group_exact(Db),
 
+    test_util:stop_couch(),
     ok.
 
 

http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/blob/5c5c5cf2/test/04-index-info.t
----------------------------------------------------------------------
diff --git a/test/04-index-info.t b/test/04-index-info.t
index 8ed6170..d7e1de1 100644
--- a/test/04-index-info.t
+++ b/test/04-index-info.t
@@ -15,8 +15,6 @@
 % the License.
 
 main(_) ->
-    test_util:init_code_path(),
-
     etap:plan(9),
     case (catch test()) of
         ok ->
@@ -31,8 +29,7 @@ main(_) ->
 sig() -> <<"276df562b152b3c4e5d34024f62672ed">>.
 
 test() ->
-    couch_server_sup:start_link(test_util:config_files()),
-    couch_httpd_sup:start_link(),
+    test_util:start_couch(),
 
     {ok, Db} = couch_mrview_test_util:init_db(<<"foo">>, map),
     couch_mrview:query_view(Db, <<"_design/bar">>, <<"baz">>),
@@ -49,6 +46,7 @@ test() ->
     etap:is(getval(compact_running, Info), false, "No compaction running."),
     etap:is(getval(waiting_clients, Info), 0, "No waiting clients."),
 
+    test_util:stop_couch(),
     ok.
 
 getval(Key, PL) ->

http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/blob/5c5c5cf2/test/05-collation.t
----------------------------------------------------------------------
diff --git a/test/05-collation.t b/test/05-collation.t
index 4c13bb7..1ebbe9c 100644
--- a/test/05-collation.t
+++ b/test/05-collation.t
@@ -19,8 +19,7 @@ main(_) ->
 
 
 test() ->
-    couch_server_sup:start_link(test_util:config_files()),
-    couch_httpd_sup:start_link(),
+    test_util:start_couch(),
 
     {ok, Db0} = couch_mrview_test_util:new_db(<<"foo">>, map),
     {ok, Db1} = couch_mrview_test_util:save_docs(Db0, docs()),
@@ -32,6 +31,7 @@ test() ->
     test_uninclusive_end(Db1),
     test_with_endkey_docid(Db1),
 
+    test_util:stop_couch(),
     ok.
 
 test_collated_fwd(Db) ->

http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/blob/5c5c5cf2/test/06-all-docs.t
----------------------------------------------------------------------
diff --git a/test/06-all-docs.t b/test/06-all-docs.t
index a031f58..0916568 100644
--- a/test/06-all-docs.t
+++ b/test/06-all-docs.t
@@ -19,8 +19,7 @@ main(_) ->
 
 
 test() ->
-    couch_server_sup:start_link(test_util:config_files()),
-    couch_httpd_sup:start_link(),
+    test_util:start_couch(),
 
     {ok, Db} = couch_mrview_test_util:init_db(<<"foo">>, map),
 
@@ -31,6 +30,7 @@ test() ->
     test_include_docs(Db),
     test_empty_view(Db),
 
+    test_util:stop_couch(),
     ok.
 
 

http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/blob/5c5c5cf2/test/07-compact-swap.t
----------------------------------------------------------------------
diff --git a/test/07-compact-swap.t b/test/07-compact-swap.t
index 34a5fb7..ba8e438 100644
--- a/test/07-compact-swap.t
+++ b/test/07-compact-swap.t
@@ -20,12 +20,13 @@ main(_) ->
 
 
 test() ->
-    couch_server_sup:start_link(test_util:config_files()),
-    couch_httpd_sup:start_link(),
+    test_util:start_couch(),
 
     {ok, Db} = couch_mrview_test_util:init_db(<<"foo">>, map, 1000),
     couch_mrview:query_view(Db, <<"_design/bar">>, <<"baz">>),
     test_swap(Db),
+
+    test_util:stop_couch(),
     ok.