couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kxe...@apache.org
Subject [11/48] couch commit: updated refs/heads/master to 7776921
Date Sat, 04 Apr 2015 23:29:06 GMT
Use test_util:stop_config in test suite

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

Branch: refs/heads/master
Commit: f568893721deeb94956ec1e75a24e5cf1b4fe358
Parents: 93d48aa
Author: ILYA Khlopotov <iilyak@ca.ibm.com>
Authored: Tue Jan 27 10:40:51 2015 -0800
Committer: ILYA Khlopotov <iilyak@ca.ibm.com>
Committed: Tue Feb 10 10:40:50 2015 -0800

----------------------------------------------------------------------
 test/couch_stats_tests.erl        | 10 +---------
 test/couch_uuids_tests.erl        |  8 +-------
 test/couchdb_os_daemons_tests.erl | 10 +---------
 3 files changed, 3 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/f5688937/test/couch_stats_tests.erl
----------------------------------------------------------------------
diff --git a/test/couch_stats_tests.erl b/test/couch_stats_tests.erl
index 2175f07..762953d 100644
--- a/test/couch_stats_tests.erl
+++ b/test/couch_stats_tests.erl
@@ -42,15 +42,7 @@ teardown_collector(_) ->
 teardown_aggregator(_, Pid) ->
     couch_stats_aggregator:stop(),
     couch_stats_collector:stop(),
-    erlang:monitor(process, Pid),
-    config:stop(),
-    receive
-        {'DOWN', _, _, Pid, _} ->
-            ok
-    after ?TIMEOUT ->
-        throw({timeout, config_stop})
-    end,
-    ok.
+    test_util:stop_config(Pid).
 
 
 couch_stats_collector_test_() ->

http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/f5688937/test/couch_uuids_tests.erl
----------------------------------------------------------------------
diff --git a/test/couch_uuids_tests.erl b/test/couch_uuids_tests.erl
index 6d91b4c..defea4f 100644
--- a/test/couch_uuids_tests.erl
+++ b/test/couch_uuids_tests.erl
@@ -21,7 +21,6 @@
 
 setup() ->
     {ok, Pid} = config:start_link(?CONFIG_CHAIN),
-    erlang:monitor(process, Pid),
     couch_uuids:start(),
     Pid.
 
@@ -35,12 +34,7 @@ setup(Opts) ->
 
 teardown(Pid) ->
     couch_uuids:stop(),
-    config:stop(),
-    receive
-        {'DOWN', _, _, Pid, _} -> ok
-    after
-        1000 -> throw({timeout_error, config_stop})
-    end.
+    test_util:stop_config(Pid).
 
 teardown(_, Pid) ->
     teardown(Pid).

http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/f5688937/test/couchdb_os_daemons_tests.erl
----------------------------------------------------------------------
diff --git a/test/couchdb_os_daemons_tests.erl b/test/couchdb_os_daemons_tests.erl
index f788e25..b978e38 100644
--- a/test/couchdb_os_daemons_tests.erl
+++ b/test/couchdb_os_daemons_tests.erl
@@ -47,15 +47,7 @@ setup(DName) ->
     {CfgPid, OsDPid}.
 
 teardown(_, {CfgPid, OsDPid}) ->
-    erlang:monitor(process, CfgPid),
-    config:stop(),
-    receive
-        {'DOWN', _, _, CfgPid, _} ->
-            ok
-    after ?TIMEOUT ->
-        throw({timeout, config_stop})
-    end,
-
+    test_util:stop_config(CfgPid),
     test_util:stop_sync_throw(OsPid, fun() ->
         exit(OsDPid, shutdown)
     end, {timeout, os_daemon_stop}, ?TIMEOUT).


Mime
View raw message