summaryrefslogtreecommitdiff
path: root/test/javascript
diff options
context:
space:
mode:
authorPaul J. Davis <paul.joseph.davis@gmail.com>2017-09-07 14:37:36 -0500
committerJan Lehnardt <jan@apache.org>2017-10-09 21:41:58 +0200
commitb030a8648214d88411191dd74f65ee4edc0ed7a2 (patch)
treef60180d6dd62815cc98376dcf0feee63ea4a62a8 /test/javascript
parentc26ce7f4093de17d4d57edde622f2a34c6ba2b07 (diff)
downloadcouchdb-improve-reduce-limit-errors.tar.gz
Return reduce overflow errors to the clientimprove-reduce-limit-errors
This changes the reduce overflow error to return an error to the client rather than blowing up the view build. This allows views that have a single bad reduce to build while not crushing the server's RAM usage.
Diffstat (limited to 'test/javascript')
-rw-r--r--test/javascript/tests/view_errors.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/javascript/tests/view_errors.js b/test/javascript/tests/view_errors.js
index b53a3c764..0d9cd79fb 100644
--- a/test/javascript/tests/view_errors.js
+++ b/test/javascript/tests/view_errors.js
@@ -174,9 +174,9 @@ couchTests.view_errors = function(debug) {
// if the reduce grows to fast, throw an overflow error
var path = "/" + db_name + "/_design/testbig/_view/reduce_too_big";
xhr = CouchDB.request("GET", path);
- T(xhr.status == 500);
+ T(xhr.status == 200);
result = JSON.parse(xhr.responseText);
- T(result.error == "reduce_overflow_error");
+ T(result.rows[0].error == "reduce_overflow_error");
try {
db.query(function() {emit(null, null)}, null, {startkey: 2, endkey:1});