couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kxe...@apache.org
Subject [3/4] couch commit: updated refs/heads/master to 74eefe9
Date Mon, 12 Jan 2015 23:03:55 GMT
Change semantic of test_util:start_couch

In order to ensure reload of couch_stat's metrics we introduce ExtraApps
argument to test_util:start_couch. This means that test start_couch/1
would become start_couch(ExtraApps) instead of start_couch(IniFiles)

COUCHDB-2540


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

Branch: refs/heads/master
Commit: 655a6d0f588bd71130c86f657fba2712334a03ac
Parents: bcbdc36
Author: ILYA Khlopotov <iilyak@ca.ibm.com>
Authored: Fri Jan 9 14:13:12 2015 -0800
Committer: ILYA Khlopotov <iilyak@ca.ibm.com>
Committed: Fri Jan 9 14:13:12 2015 -0800

----------------------------------------------------------------------
 src/test_util.erl                 | 11 +++++++----
 test/couchdb_http_proxy_tests.erl |  2 +-
 2 files changed, 8 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/655a6d0f/src/test_util.erl
----------------------------------------------------------------------
diff --git a/src/test_util.erl b/src/test_util.erl
index 9340d36..f5cee1c 100644
--- a/src/test_util.erl
+++ b/src/test_util.erl
@@ -18,7 +18,7 @@
 -export([source_file/1, build_file/1]).
 %% -export([run/2]).
 -export([request/3, request/4]).
--export([start_couch/0, start_couch/1, stop_couch/0, stop_couch/1]).
+-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]).
 
@@ -80,13 +80,16 @@ request(Url, Headers, Method, Body, N) ->
 
 
 start_couch() ->
-    start_couch(?CONFIG_CHAIN).
+    start_couch(?CONFIG_CHAIN, []).
 
+start_couch(ExtraApps) ->
+    start_couch(?CONFIG_CHAIN, ExtraApps).
 
-start_couch(IniFiles) ->
+start_couch(IniFiles, ExtraApps) ->
     ok = application:set_env(config, ini_files, IniFiles),
     ok = lager:start(),
-    ok = start_applications([inets, ibrowse, ssl, config, couch]),
+    ok = start_applications([inets, ibrowse, ssl, config, couch] ++ ExtraApps),
+    couch_stats:reload(),
     ok.
 
 

http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/655a6d0f/test/couchdb_http_proxy_tests.erl
----------------------------------------------------------------------
diff --git a/test/couchdb_http_proxy_tests.erl b/test/couchdb_http_proxy_tests.erl
index 1752256..733494a 100644
--- a/test/couchdb_http_proxy_tests.erl
+++ b/test/couchdb_http_proxy_tests.erl
@@ -33,7 +33,7 @@ start() ->
     % we have to write any config changes to temp ini file to not loose them
     % when supervisor will kill all children due to reaching restart threshold
     % (each httpd_global_handlers changes causes couch_httpd restart)
-    ok = test_util:start_couch(?CONFIG_CHAIN ++ [?CONFIG_FIXTURE_TEMP]),
+    ok = test_util:start_couch(?CONFIG_CHAIN ++ [?CONFIG_FIXTURE_TEMP], []),
     % 49151 is IANA Reserved, let's assume no one is listening there
     config:set("httpd_global_handlers", "_error",
         "{couch_httpd_proxy, handle_proxy_req, <<\"http://127.0.0.1:49151/\">>}"


Mime
View raw message