summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Newson <rnewson@apache.org>2019-10-17 22:47:52 +0100
committerGitHub <noreply@github.com>2019-10-17 22:47:52 +0100
commit78a7ff2e9b69ef91c9a4d4f1d903edf12f1658dd (patch)
tree7d8eea9d6a28900be36762c68a9bc9e93b47b915
parent1dd00d6ac70dde48287a23106ca561df36e67a56 (diff)
parent0a85b75ee150618ded27570b636a294c64514645 (diff)
downloadcouchdb-78a7ff2e9b69ef91c9a4d4f1d903edf12f1658dd.tar.gz
Merge pull request #2260 from apache/ken-query-servers
export get_servers_from_env/1 for ken
-rw-r--r--rebar.config.script2
-rw-r--r--src/couch/src/couch_proc_manager.erl3
-rw-r--r--test/javascript/tests/design_docs.js32
-rw-r--r--test/javascript/tests/view_update_seq.js2
4 files changed, 5 insertions, 34 deletions
diff --git a/rebar.config.script b/rebar.config.script
index 75a4a3e71..960151795 100644
--- a/rebar.config.script
+++ b/rebar.config.script
@@ -104,7 +104,7 @@ DepDescs = [
{ioq, "ioq", {tag, "2.1.2"}},
{hqueue, "hqueue", {tag, "1.0.1"}},
{smoosh, "smoosh", {tag, "1.0.1"}},
-{ken, "ken", {tag, "1.0.3"}},
+{ken, "ken", {tag, "1.0.4"}},
%% Non-Erlang deps
{docs, {url, "https://github.com/apache/couchdb-documentation"},
diff --git a/src/couch/src/couch_proc_manager.erl b/src/couch/src/couch_proc_manager.erl
index 3366b2bca..0daef3ee9 100644
--- a/src/couch/src/couch_proc_manager.erl
+++ b/src/couch/src/couch_proc_manager.erl
@@ -21,7 +21,8 @@
get_stale_proc_count/0,
new_proc/1,
reload/0,
- terminate_stale_procs/0
+ terminate_stale_procs/0,
+ get_servers_from_env/1
]).
-export([
diff --git a/test/javascript/tests/design_docs.js b/test/javascript/tests/design_docs.js
index 780fc1354..b23075bea 100644
--- a/test/javascript/tests/design_docs.js
+++ b/test/javascript/tests/design_docs.js
@@ -252,9 +252,7 @@ couchTests.design_docs = function(debug) {
db.bulkSave(makeDocs(1, numDocs + 1));
T(db.ensureFullCommit().ok);
- // test that we get correct design doc info back,
- // and also that GET /db/_design/test/_info
- // hasn't triggered an update of the views
+ // test that we get correct design doc info back.
db.view("test/summate", {stale: "ok"}); // make sure view group's open
for (var i = 0; i < 2; i++) {
var dinfo = db.designInfo("_design/test");
@@ -263,13 +261,6 @@ couchTests.design_docs = function(debug) {
TEquals(prev_view_size, vinfo.sizes.file, "view group disk size didn't change");
TEquals(false, vinfo.compact_running);
TEquals(prev_view_sig, vinfo.signature, 'ddoc sig');
- // wait some time (there were issues where an update
- // of the views had been triggered in the background)
- var start = new Date().getTime();
- while (new Date().getTime() < start + 2000);
- TEquals(0, db.view("test/all_docs_twice", {stale: "ok"}).total_rows, 'view info');
- TEquals(0, db.view("test/single_doc", {stale: "ok"}).total_rows, 'view info');
- TEquals(0, db.view("test/summate", {stale: "ok"}).rows.length, 'view info');
T(db.ensureFullCommit().ok);
// restartServer();
};
@@ -283,27 +274,6 @@ couchTests.design_docs = function(debug) {
var start = new Date().getTime();
while (new Date().getTime() < start + 2000);
- // test that POST /db/_view_cleanup
- // doesn't trigger an update of the views
- var len1 = db.view("test/all_docs_twice", {stale: "ok"}).total_rows;
- var len2 = db.view("test/single_doc", {stale: "ok"}).total_rows;
- var len3 = db.view("test/summate", {stale: "ok"}).rows.length;
- for (i = 0; i < 2; i++) {
- T(db.viewCleanup().ok);
- // wait some time (there were issues where an update
- // of the views had been triggered in the background)
- start = new Date().getTime();
- while (new Date().getTime() < start + 2000);
- TEquals(len1, db.view("test/all_docs_twice", {stale: "ok"}).total_rows, 'view cleanup');
- TEquals(len2, db.view("test/single_doc", {stale: "ok"}).total_rows, 'view cleanup');
- TEquals(len3, db.view("test/summate", {stale: "ok"}).rows.length, 'view cleanup');
- T(db.ensureFullCommit().ok);
- // restartServer();
- // we'll test whether the view group stays closed
- // and the views stay uninitialized (they should!)
- len1 = len2 = len3 = 0;
- };
-
// test commonjs in map functions
resp = db.view("test/commonjs", {limit:1});
T(resp.rows[0].value == 'ok');
diff --git a/test/javascript/tests/view_update_seq.js b/test/javascript/tests/view_update_seq.js
index a74b08d9f..eaba4042e 100644
--- a/test/javascript/tests/view_update_seq.js
+++ b/test/javascript/tests/view_update_seq.js
@@ -86,7 +86,7 @@ couchTests.view_update_seq = function(debug) {
resp = db.view('test/all_docs',
{limit: 1, stale: "update_after", update_seq: true});
T(resp.rows.length == 1);
- TEquals(101, seqInt(resp.update_seq));
+ T(seqInt(resp.update_seq) == 101 || seqInt(resp.update_seq) == 102);
// wait 5 seconds for the next assertions to pass in very slow machines
var t0 = new Date(), t1;