You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by da...@apache.org on 2020/01/08 19:50:31 UTC

[couchdb] 02/02: Debug design_docs.js failure

This is an automated email from the ASF dual-hosted git repository.

davisp pushed a commit to branch debug-javascript-test-failures
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit 9cfc5868a3d9a9666d469e4da0f7ed0f3be2145d
Author: Paul J. Davis <pa...@gmail.com>
AuthorDate: Wed Jan 8 13:49:39 2020 -0600

    Debug design_docs.js failure
    
    This test has been failing randomly on Jenkins across multiple PRs. This
    adds more context to the error that causes the test to fail.
---
 test/javascript/tests/design_docs.js | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/test/javascript/tests/design_docs.js b/test/javascript/tests/design_docs.js
index e28cb2e..55e592a 100644
--- a/test/javascript/tests/design_docs.js
+++ b/test/javascript/tests/design_docs.js
@@ -427,10 +427,12 @@ couchTests.design_docs = function(debug) {
   ddoc._deleted = true;
   TEquals(true, db.save(ddoc).ok);
 
+  var resp = db.save({_id: "doc1", value: 4})
   try {
-    TEquals(true, db.save({_id: "doc1", value: 4}).ok);
+    TEquals(true, resp.ok);
   } catch (x) {
-    T(false, "doc insertion should have succeeded");
+    resp = JSON.stringify(resp)
+    T(false, "doc insertion should have succeeded: " + resp);
   }
 
   doc = db.open("doc1");