Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

export get_servers_from_env/1 for ken #2260

Merged
merged 1 commit into from
Oct 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion rebar.config.script
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
Expand Down
3 changes: 2 additions & 1 deletion src/couch/src/couch_proc_manager.erl
Original file line number Diff line number Diff line change
Expand Up @@ -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([
Expand Down
32 changes: 1 addition & 31 deletions test/javascript/tests/design_docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand All @@ -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();
};
Expand All @@ -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');
Expand Down
2 changes: 1 addition & 1 deletion test/javascript/tests/view_update_seq.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down