summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjiahuili <Jiahui.Li@ibm.com>2021-07-01 14:59:50 -0500
committerNick Vatamaniuc <nickva@users.noreply.github.com>2021-07-02 09:51:31 -0400
commita15a93ac4db36c586100b84e13ed1ebc3c2bcf08 (patch)
treea167f86eacfd621d17eb13b0ec7fcd51a8e052fd
parent9b609f4d891f11d5c3c9c324356219c8516a4177 (diff)
downloadcouchdb-a15a93ac4db36c586100b84e13ed1ebc3c2bcf08.tar.gz
comment out max_document_size
-rw-r--r--rel/overlay/etc/default.ini2
-rw-r--r--test/elixir/test/bulk_docs_test.exs6
2 files changed, 3 insertions, 5 deletions
diff --git a/rel/overlay/etc/default.ini b/rel/overlay/etc/default.ini
index 09d1887da..a65d667dc 100644
--- a/rel/overlay/etc/default.ini
+++ b/rel/overlay/etc/default.ini
@@ -35,7 +35,7 @@ uuid = {{uuid}}
; requests which update a single document as well as individual documents from
; a _bulk_docs request. The size limit is approximate due to the nature of JSON
; encoding. The size limit must be less than or equal to 8000000 bytes.
-max_document_size = 8000000 ; bytes
+;max_document_size = 8000000 ; bytes
;
; Maximum number of documents in a _bulk_docs request. Anything larger
; returns a 413 error for the whole request
diff --git a/test/elixir/test/bulk_docs_test.exs b/test/elixir/test/bulk_docs_test.exs
index 74500d45a..7d7948f7f 100644
--- a/test/elixir/test/bulk_docs_test.exs
+++ b/test/elixir/test/bulk_docs_test.exs
@@ -132,11 +132,9 @@ defmodule BulkDocsTest do
@tag :with_db
test "bulk docs raises error for transaction larger than 10MB", ctx do
- docs = [%{_id: "0", a: random_string(16_000_000)}]
- old_size = Couch.get("/_node/node1@127.0.0.1/_config/couchdb/max_document_size").body
- set_config_raw("couchdb", "max_document_size", "67108864") # 64M
+ # the default value for max_document_size is 8_000_000
+ docs = [%{_id: "0", a: random_string(9_000_000)}]
resp = Couch.post("/#{ctx[:db_name]}/_bulk_docs", body: %{docs: docs})
- set_config_raw("couchdb", "max_document_size", old_size) # set back
assert resp.status_code == 413
assert resp.body["error"] == "document_too_large"
assert resp.body["reason"] == "0" # DocID