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/02/07 15:37:03 UTC
[couchdb] branch master updated (27bb450 -> c4aee4d)
This is an automated email from the ASF dual-hosted git repository.
davisp pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/couchdb.git.
from 27bb450 Simplify couch_auth_cache
new f1ed7e5 Update to Jiffy 1.0.3
new 981ee91 Fix test failure in view_errors.js
new c4aee4d Force OOM error
The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
rebar.config.script | 2 +-
src/couch/test/eunit/couch_js_tests.erl | 24 ++++++++++++++++++------
test/javascript/tests/view_errors.js | 9 +++++++--
3 files changed, 26 insertions(+), 9 deletions(-)
[couchdb] 02/03: Fix test failure in view_errors.js
Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
davisp pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit 981ee9105e23ce3aaa98d81674986175b22d819c
Author: Paul J. Davis <pa...@gmail.com>
AuthorDate: Wed Feb 5 14:05:01 2020 -0600
Fix test failure in view_errors.js
---
test/javascript/tests/view_errors.js | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/test/javascript/tests/view_errors.js b/test/javascript/tests/view_errors.js
index 7aad40c..6b9c754 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.
[couchdb] 01/03: Update to Jiffy 1.0.3
Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
davisp pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit f1ed7e515f0ce5263ed5f746ccb2ca5ed83be176
Author: Paul J. Davis <pa...@gmail.com>
AuthorDate: Wed Feb 5 10:00:33 2020 -0600
Update to Jiffy 1.0.3
This fixes builds on Windows and CentOS.
---
rebar.config.script | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/rebar.config.script b/rebar.config.script
index 0708606..d344e17 100644
--- a/rebar.config.script
+++ b/rebar.config.script
@@ -157,7 +157,7 @@ DepDescs = [
{folsom, "folsom", {tag, "CouchDB-0.8.3"}},
{hyper, "hyper", {tag, "CouchDB-2.2.0-6"}},
{ibrowse, "ibrowse", {tag, "CouchDB-4.0.1-1"}},
-{jiffy, "jiffy", {tag, "CouchDB-1.0.1-1"}},
+{jiffy, "jiffy", {tag, "CouchDB-1.0.3-1"}},
{mochiweb, "mochiweb", {tag, "v2.20.0"}},
{meck, "meck", {tag, "0.8.8"}},
{recon, "recon", {tag, "2.5.0"}}
[couchdb] 03/03: Force OOM error
Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
davisp pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit c4aee4dc5b19cdcc55bb44e8863bc62403d635e6
Author: Paul J. Davis <pa...@gmail.com>
AuthorDate: Thu Feb 6 10:21:13 2020 -0600
Force OOM error
This changes the couchjs OOM test so that it will trigger more reliably
on SpiderMonkey 60. It appears that newer SpiderMonkeys are better at
conserving memory usage which takes this test longer to trigger.
---
src/couch/test/eunit/couch_js_tests.erl | 24 ++++++++++++++++++------
1 file changed, 18 insertions(+), 6 deletions(-)
diff --git a/src/couch/test/eunit/couch_js_tests.erl b/src/couch/test/eunit/couch_js_tests.erl
index d3d92a2..cd6452c 100644
--- a/src/couch/test/eunit/couch_js_tests.erl
+++ b/src/couch/test/eunit/couch_js_tests.erl
@@ -15,9 +15,12 @@
-define(FUNC, <<
+ "var state = [];\n"
"function(doc) {\n"
" var val = \"0123456789ABCDEF\";\n"
- " while(true) {emit(val, val);}\n"
+ " for(var i = 0; i < 165535; i++) {\n"
+ " state.push([val, val]);\n"
+ " }\n"
"}\n"
>>).
@@ -30,7 +33,7 @@ couch_js_test_() ->
fun test_util:start_couch/0,
fun test_util:stop_couch/1,
[
- fun should_exit_on_oom/0
+ {timeout, 60000, fun should_exit_on_oom/0}
]
}
}.
@@ -39,7 +42,16 @@ couch_js_test_() ->
should_exit_on_oom() ->
Proc = couch_query_servers:get_os_process(<<"javascript">>),
true = couch_query_servers:proc_prompt(Proc, [<<"add_fun">>, ?FUNC]),
- ?assertThrow(
- {os_process_error, {exit_status, 1}},
- couch_query_servers:proc_prompt(Proc, [<<"map_doc">>, <<"{}">>])
- ).
+ trigger_oom(Proc).
+
+trigger_oom(Proc) ->
+ Status = try
+ couch_query_servers:proc_prompt(Proc, [<<"map_doc">>, <<"{}">>]),
+ continue
+ catch throw:{os_process_error, {exit_status, 1}} ->
+ done
+ end,
+ case Status of
+ continue -> trigger_oom(Proc);
+ done -> ok
+ end.