summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdev/run1
-rw-r--r--rel/overlay/etc/default.ini4
-rw-r--r--src/dreyfus/src/dreyfus_httpd.erl2
-rw-r--r--src/mango/src/mango_cursor.erl2
-rw-r--r--src/mango/test/05-index-selection-test.py8
-rw-r--r--src/mango/test/12-use-correct-index-test.py2
-rw-r--r--test/javascript/tests/view_errors.js1
7 files changed, 11 insertions, 9 deletions
diff --git a/dev/run b/dev/run
index 3186a1fc8..a96817d83 100755
--- a/dev/run
+++ b/dev/run
@@ -422,6 +422,7 @@ def hack_local_ini(ctx, contents):
contents = contents.replace(previous_line, previous_line + secret_line)
if ctx["with_admin_party"]:
+ os.environ["COUCHDB_TEST_ADMIN_PARTY_OVERRIDE"] = "1"
ctx["admin"] = ("Admin Party!", "You do not need any password.")
return contents
diff --git a/rel/overlay/etc/default.ini b/rel/overlay/etc/default.ini
index 599942d44..1829d0d74 100644
--- a/rel/overlay/etc/default.ini
+++ b/rel/overlay/etc/default.ini
@@ -97,8 +97,8 @@ couch = couch_bt_engine
[process_priority]
; Selectively disable altering process priorities for modules that request it.
; * NOTE: couch_server priority has been shown to lead to CouchDB hangs and
-; unexpected failures. Do not enable unless you're sure you can tolerate
-; this possibility.
+; failures on Erlang releases 21.0 - 21.3.8.12 and 22.0 -> 22.2.4. Do not
+; enable when running with those versions.
;couch_server = false
[cluster]
diff --git a/src/dreyfus/src/dreyfus_httpd.erl b/src/dreyfus/src/dreyfus_httpd.erl
index e9851639b..346f5ede6 100644
--- a/src/dreyfus/src/dreyfus_httpd.erl
+++ b/src/dreyfus/src/dreyfus_httpd.erl
@@ -344,7 +344,7 @@ parse_json_index_param(<<"highlight_fields">>, Value) ->
[{highlight_fields, Value}];
parse_json_index_param(<<"highlight_pre_tag">>, Value) ->
[{highlight_pre_tag, Value}];
-parse_json_index_param(<<"highlight_pos_tag">>, Value) ->
+parse_json_index_param(<<"highlight_post_tag">>, Value) ->
[{highlight_post_tag, Value}];
parse_json_index_param(<<"highlight_number">>, Value) ->
[{highlight_number, parse_positive_int_param2("highlight_number", Value)}];
diff --git a/src/mango/src/mango_cursor.erl b/src/mango/src/mango_cursor.erl
index 29be49490..b1cb4148e 100644
--- a/src/mango/src/mango_cursor.erl
+++ b/src/mango/src/mango_cursor.erl
@@ -133,7 +133,7 @@ maybe_add_warning(UserFun, #cursor{index = Index, opts = Opts}, Stats, UserAcc)
[] ->
UserAcc;
_ ->
- WarningStr = lists:join(<<"\n">>, Warnings),
+ WarningStr = iolist_to_binary(lists:join(<<"\n">>, Warnings)),
Arg = {add_key, warning, WarningStr},
{_Go, UserAcc1} = UserFun(Arg, UserAcc),
UserAcc1
diff --git a/src/mango/test/05-index-selection-test.py b/src/mango/test/05-index-selection-test.py
index 271e36176..2bc5a88f0 100644
--- a/src/mango/test/05-index-selection-test.py
+++ b/src/mango/test/05-index-selection-test.py
@@ -84,7 +84,7 @@ class IndexSelectionTests:
ddocid = "_design/age"
r = self.db.find({}, use_index=ddocid, return_raw=True)
self.assertEqual(
- r["warning"][0].lower(),
+ r["warning"].split('\n')[0].lower(),
"{0} was not used because it does not contain a valid index for this query.".format(
ddocid
),
@@ -107,7 +107,7 @@ class IndexSelectionTests:
selector = {"company": "Pharmex"}
r = self.db.find(selector, use_index=ddocid, return_raw=True)
self.assertEqual(
- r["warning"][0].lower(),
+ r["warning"].split('\n')[0].lower(),
"{0} was not used because it does not contain a valid index for this query.".format(
ddocid
),
@@ -124,7 +124,7 @@ class IndexSelectionTests:
resp = self.db.find(selector, use_index=[ddocid, name], return_raw=True)
self.assertEqual(
- resp["warning"][0].lower(),
+ resp["warning"].split('\n')[0].lower(),
"{0}, {1} was not used because it is not a valid index for this query.".format(
ddocid, name
),
@@ -162,7 +162,7 @@ class IndexSelectionTests:
selector, sort=["foo", "bar"], use_index=ddocid_invalid, return_raw=True
)
self.assertEqual(
- resp["warning"][0].lower(),
+ resp["warning"].split('\n')[0].lower(),
"{0} was not used because it does not contain a valid index for this query.".format(
ddocid_invalid
),
diff --git a/src/mango/test/12-use-correct-index-test.py b/src/mango/test/12-use-correct-index-test.py
index 3a2f60af8..b6fe434f8 100644
--- a/src/mango/test/12-use-correct-index-test.py
+++ b/src/mango/test/12-use-correct-index-test.py
@@ -93,7 +93,7 @@ class ChooseCorrectIndexForDocs(mango.DbPerClass):
self.assertEqual(explain_resp["index"]["type"], "special")
resp = self.db.find(selector, return_raw=True)
self.assertEqual(
- resp["warning"][0].lower(),
+ resp["warning"].split('\n')[0].lower(),
"no matching index found, create an index to optimize query time.",
)
diff --git a/test/javascript/tests/view_errors.js b/test/javascript/tests/view_errors.js
index f135b749a..7aad40c9a 100644
--- a/test/javascript/tests/view_errors.js
+++ b/test/javascript/tests/view_errors.js
@@ -154,6 +154,7 @@ 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");
}