Return-Path: X-Original-To: apmail-couchdb-commits-archive@www.apache.org Delivered-To: apmail-couchdb-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5867317D3F for ; Sat, 4 Apr 2015 23:28:58 +0000 (UTC) Received: (qmail 44606 invoked by uid 500); 4 Apr 2015 23:28:57 -0000 Delivered-To: apmail-couchdb-commits-archive@couchdb.apache.org Received: (qmail 44459 invoked by uid 500); 4 Apr 2015 23:28:57 -0000 Mailing-List: contact commits-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list commits@couchdb.apache.org Received: (qmail 44021 invoked by uid 99); 4 Apr 2015 23:28:56 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Apr 2015 23:28:56 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 63C7CE2F65; Sat, 4 Apr 2015 23:28:56 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: kxepal@apache.org To: commits@couchdb.apache.org Date: Sat, 04 Apr 2015 23:29:08 -0000 Message-Id: In-Reply-To: <7e6f3f454a6141008e620dd6cb309fa6@git.apache.org> References: <7e6f3f454a6141008e620dd6cb309fa6@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [13/48] couch commit: updated refs/heads/master to 7776921 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 Authored: Tue Feb 10 10:45:42 2015 -0800 Committer: ILYA Khlopotov 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} ->