You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ja...@apache.org on 2017/05/16 07:37:35 UTC
[couchdb] branch master updated: chore: add debugging for failing
test case, see COUCHDB-3415
This is an automated email from the ASF dual-hosted git repository.
jan 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 51a630b chore: add debugging for failing test case, see COUCHDB-3415
51a630b is described below
commit 51a630bd94aab693050c41defc320074d9dfc591
Author: Jan Lehnardt <ja...@apache.org>
AuthorDate: Sun May 14 11:34:00 2017 +0200
chore: add debugging for failing test case, see COUCHDB-3415
---
src/chttpd/test/chttpd_db_test.erl | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/src/chttpd/test/chttpd_db_test.erl b/src/chttpd/test/chttpd_db_test.erl
index b7ea7f0..02d74ad 100644
--- a/src/chttpd/test/chttpd_db_test.erl
+++ b/src/chttpd/test/chttpd_db_test.erl
@@ -86,7 +86,17 @@ should_accept_live_as_an_alias_for_continuous(Url) ->
?_test(begin
{ok, _, _, ResultBody} =
test_request:get(Url ++ "/_changes?feed=live&timeout=1", [?AUTH]),
- {ResultJson} = ?JSON_DECODE(ResultBody),
+ % https://issues.apache.org/jira/browse/COUCHDB-3415?filter=12340503
+ % if the decode fails, print out ResultBody, so we can debug what
+ % extra data is coming in.
+ {ResultJson} = try ?JSON_DECODE(ResultBody) of
+ Json -> Json
+ catch
+ throw:Error ->
+ io:format(user, "~nJSON_DECODE error: ~p~n", [Error]),
+ io:format(user, "~nOffending String: ~p~n", [ResultBody]),
+ ?assert(false) % should not happen, abort
+ end,
<<LastSeqNum0:1/binary, "-", _/binary>> = couch_util:get_value(
<<"last_seq">>, ResultJson, undefined),
LastSeqNum = list_to_integer(binary_to_list(LastSeqNum0)),
--
To stop receiving notification emails like this one, please contact
['"commits@couchdb.apache.org" <co...@couchdb.apache.org>'].