You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by va...@apache.org on 2017/06/08 19:36:28 UTC
[couchdb] branch master updated: Properly kill OS daemons during
test
This is an automated email from the ASF dual-hosted git repository.
vatamane pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/couchdb.git
The following commit(s) were added to refs/heads/master by this push:
new b45ed88 Properly kill OS daemons during test
b45ed88 is described below
commit b45ed88e7a7860744236d3a59deb04a24d64c39c
Author: Nick Vatamaniuc <va...@apache.org>
AuthorDate: Thu Jun 8 11:50:45 2017 -0400
Properly kill OS daemons during test
Even if it clean up fails use `kill` to avoid failing the next set of tests.
Issue: #571
---
src/couch/test/couchdb_os_daemons_tests.erl | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/src/couch/test/couchdb_os_daemons_tests.erl b/src/couch/test/couchdb_os_daemons_tests.erl
index 9e8be5f..aba1a55 100644
--- a/src/couch/test/couchdb_os_daemons_tests.erl
+++ b/src/couch/test/couchdb_os_daemons_tests.erl
@@ -56,9 +56,16 @@ setup(DName) ->
{Ctx, OsDPid}.
teardown(_, {Ctx, OsDPid}) ->
- test_util:stop_sync_throw(OsDPid, fun() ->
- exit(OsDPid, shutdown)
- end, {timeout, os_daemon_stop}, ?TIMEOUT),
+ try
+ test_util:stop_sync_throw(OsDPid, fun() ->
+ exit(OsDPid, shutdown)
+ end, {timeout, os_daemon_stop}, ?TIMEOUT)
+ catch
+ {timeout, os_daemon_stop} ->
+ Msg = "~nWARNING: OS daemons test stop ~p msec timeout exceeded~n",
+ io:format(standard_error, Msg, [?TIMEOUT]),
+ exit(OsDPid, kill)
+ end,
test_util:stop(Ctx).
--
To stop receiving notification emails like this one, please contact
['"commits@couchdb.apache.org" <co...@couchdb.apache.org>'].