couchdb-commits mailing list archives

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

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

Branch: refs/heads/master
Commit: f66255f83975128c6fdf33e043e2418772165c36
Parents: cacca04
Author: ILYA Khlopotov <iilyak@ca.ibm.com>
Authored: Tue Jan 27 08:46:27 2015 -0800
Committer: ILYA Khlopotov <iilyak@ca.ibm.com>
Committed: Tue Feb 10 10:37:42 2015 -0800

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


http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/f66255f8/src/test_util.erl
----------------------------------------------------------------------
diff --git a/src/test_util.erl b/src/test_util.erl
index 219cf6b..1ac9794 100644
--- a/src/test_util.erl
+++ b/src/test_util.erl
@@ -108,13 +108,11 @@ start_config(Chain) ->
 
 stop_config(Pid) ->
     Timeout = 1000,
-    erlang:monitor(process, Pid),
-    config:stop(),
-    receive
-        {'DOWN', _, _, Pid, _} ->
+    case stop_sync(Pid, fun() -> config:stop() end, Timeout) of
+        timeout ->
+            throw({timeout_error, config_stop});
+        _Else ->
             ok
-    after Timeout ->
-        throw({timeout_error, config_stop})
     end.
 
 stop_sync(Name) ->


Mime
View raw message