summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorILYA Khlopotov <iilyak@apache.org>2018-07-26 06:08:46 -0700
committerJoan Touzet <wohali@users.noreply.github.com>2018-07-31 18:40:19 -0400
commitef88643d86de50003e89e53aa3387d83f054bb5c (patch)
treeea06f6e77701e8c34870c063f555782d96d78e4a
parentd408b403bef1a69e50ff13b4f8e18d0ac2fe12c3 (diff)
downloadcouchdb-ef88643d86de50003e89e53aa3387d83f054bb5c.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.