Merge pull request #2260 from apache/ken-query-servers

export get_servers_from_env/1 for ken
diff --git a/rebar.config.script b/rebar.config.script
index 75a4a3e7..9601517 100644
--- a/rebar.config.script
+++ b/rebar.config.script
@@ -104,7 +104,7 @@
 {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 3366b2b..0daef3e 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 780fc13..b23075b 100644
--- a/test/javascript/tests/design_docs.js
+++ b/test/javascript/tests/design_docs.js
@@ -252,9 +252,7 @@
     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 @@
       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 @@
     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 a74b08d..eaba404 100644
--- a/test/javascript/tests/view_update_seq.js
+++ b/test/javascript/tests/view_update_seq.js
@@ -86,7 +86,7 @@
   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;