couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kxe...@apache.org
Subject [13/48] couch commit: updated refs/heads/master to 7776921
Date Sat, 04 Apr 2015 23:29:08 GMT
Implement test_util:stop_applications/1

COUCHDB-2547


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

Branch: refs/heads/master
Commit: 74f539a3cfd6f35f40aedc84b701ec5caaf3d749
Parents: b5d8e09
Author: ILYA Khlopotov <iilyak@ca.ibm.com>
Authored: Tue Feb 10 10:45:42 2015 -0800
Committer: ILYA Khlopotov <iilyak@ca.ibm.com>
Committed: Tue Feb 10 10:45:42 2015 -0800

----------------------------------------------------------------------
 src/test_util.erl | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/74f539a3/src/test_util.erl
----------------------------------------------------------------------
diff --git a/src/test_util.erl b/src/test_util.erl
index 0fbf1de..0b96095 100644
--- a/src/test_util.erl
+++ b/src/test_util.erl
@@ -20,7 +20,7 @@
 
 -export([start_couch/0, start_couch/1, start_couch/2, stop_couch/0, stop_couch/1]).
 -export([start_config/1, stop_config/1]).
--export([start_applications/1]).
+-export([start_applications/1, stop_applications/1]).
 
 -export([stop_sync/1, stop_sync/2, stop_sync/3]).
 
@@ -69,16 +69,9 @@ start_couch(IniFiles, ExtraApps) ->
     Ctx.
 
 stop_couch() ->
-    ok = application:stop(couch),
-    ok = application:stop(lager),
-    ok = application:stop(goldrush),
-    ok = application:stop(config),
-    ok = application:stop(ssl),
-    ok = application:stop(ibrowse),
-    ok = application:stop(inets),
+    ok = stop_applications([inets, ibrowse, ssl, config, goldrush, lager, couch]),
     ok.
 
-
 stop_couch(_) ->
     stop_couch().
 
@@ -100,6 +93,10 @@ start_applications([App|Apps], Acc) ->
             start_applications(Apps, [App|Acc])
     end.
 
+stop_applications(Apps) ->
+    [application:stop(App) || App <- lists:reverse(Apps)],
+    ok.
+
 start_config(Chain) ->
     case config:start_link(Chain) of
         {ok, Pid} ->


Mime
View raw message