summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul J. Davis <paul.joseph.davis@gmail.com>2020-02-05 14:05:01 -0600
committerPaul J. Davis <paul.joseph.davis@gmail.com>2020-02-06 08:33:21 -0600
commit4b5c41bfdd0c4eb293574e1ae3ea9ef7f2dfaf8b (patch)
tree36c917bfd12392009456074ef670b07b02678714
parentfcef6c95fe89012dd9db56998b0a5366f2dcf61f (diff)
downloadcouchdb-update-jiffy-1.0.2.tar.gz
Fix test failure in view_errors.jsupdate-jiffy-1.0.2
-rw-r--r--test/javascript/tests/view_errors.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/test/javascript/tests/view_errors.js b/test/javascript/tests/view_errors.js
index 7aad40c9a..6b9c75466 100644
--- a/test/javascript/tests/view_errors.js
+++ b/test/javascript/tests/view_errors.js
@@ -154,8 +154,13 @@ couchTests.view_errors = function(debug) {
db.view("infinite/infinite_loop");
T(0 == 1);
} catch(e) {
- console.log("infinite sorrow: " + e.error);
- T(e.error == "os_process_error");
+ // This test has two different races. The first is whether
+ // the while loop exhausts the JavaScript RAM limits before
+ // timing. The second is a race between which of two timeouts
+ // fires first. The first timeout is the couch_os_process
+ // waiting for data back from couchjs. The second is the
+ // gen_server call to couch_os_process.
+ T(e.error == "os_process_error" || e.error == "timeout");
}
// Check error responses for invalid multi-get bodies.