summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorILYA Khlopotov <iilyak@apache.org>2018-07-26 06:08:46 -0700
committerJan Lehnardt <jan@apache.org>2018-07-29 18:55:14 +0200
commit56bd13d0d61c142eeae3a03da26f2f17a5d6ece8 (patch)
tree3e5b8bbfcdac992acdaaafdf595cfd3f08b5a22a
parent10c19dc5cbcb390d286b9a69a2c23b1bc77368ab (diff)
downloadcouchdb-56bd13d0d61c142eeae3a03da26f2f17a5d6ece8.tar.gz
Improve logging from test_util
Sometimes it is hard to guess what went wrong when application started via `test_util:start_applications` or `test_util:start_couch` is unable to start. Since the traceback was truncated. This change would print the reason in addition to the traceback.
-rw-r--r--src/couch/src/test_util.erl3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/couch/src/test_util.erl b/src/couch/src/test_util.erl
index 738e9a3fb..efb506460 100644
--- a/src/couch/src/test_util.erl
+++ b/src/couch/src/test_util.erl
@@ -101,6 +101,9 @@ start_applications([App|Apps], Acc) ->
io:format(standard_error, "Application ~s was left running!~n", [App]),
application:stop(App),
start_applications([App|Apps], Acc);
+ {error, Reason} ->
+ io:format(standard_error, "Cannot start application '~s', reason ~p~n", [App, Reason]),
+ throw({error, {cannot_start, App, Reason}});
ok ->
start_applications(Apps, [App|Acc])
end.