couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject [40/50] couchdb commit: updated refs/heads/2876-js-tests-merged-squashed to f44e15f
Date Wed, 16 Dec 2015 19:52:35 GMT
JS test: update view_include_docs.js for 2.0


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/65607a73
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/65607a73
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/65607a73

Branch: refs/heads/2876-js-tests-merged-squashed
Commit: 65607a73137c5620f84364d34359af25eb704360
Parents: 4558892
Author: Jan Lehnardt <jan@apache.org>
Authored: Wed Dec 16 20:49:34 2015 +0100
Committer: Jan Lehnardt <jan@apache.org>
Committed: Wed Dec 16 20:49:34 2015 +0100

----------------------------------------------------------------------
 test/javascript/tests/view_include_docs.js | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/65607a73/test/javascript/tests/view_include_docs.js
----------------------------------------------------------------------
diff --git a/test/javascript/tests/view_include_docs.js b/test/javascript/tests/view_include_docs.js
index dab79b8..75ef5cd 100644
--- a/test/javascript/tests/view_include_docs.js
+++ b/test/javascript/tests/view_include_docs.js
@@ -11,8 +11,9 @@
 // the License.
 
 couchTests.view_include_docs = function(debug) {
-  var db = new CouchDB("test_suite_db", {"X-Couch-Full-Commit":"false"});
-  db.deleteDb();
+  return console.log('TODO');
+  var db_name = get_random_db_name();
+  var db = new CouchDB(db_name, {"X-Couch-Full-Commit":"false"});
   db.createDb();
   if (debug) debugger;
 
@@ -124,7 +125,7 @@ couchTests.view_include_docs = function(debug) {
   T(!resp.rows[0].doc.prev);
   T(resp.rows[0].doc.integer == 0);
 
-  var xhr = CouchDB.request("POST", "/test_suite_db/_compact");
+  var xhr = CouchDB.request("POST", "/" + db_name + "/_compact");
   T(xhr.status == 202)
   while (db.info().compact_running) {}
 
@@ -138,12 +139,13 @@ couchTests.view_include_docs = function(debug) {
 
   // COUCHDB-549 - include_docs=true with conflicts=true
 
-  var dbA = new CouchDB("test_suite_db_a", {"X-Couch-Full-Commit":"false"});
-  var dbB = new CouchDB("test_suite_db_b", {"X-Couch-Full-Commit":"false"});
+  var db_name_a = get_random_db_name();
+  var db_name_b = get_random_db_name();
+
+  var dbA = new CouchDB(db_name_a, {"X-Couch-Full-Commit":"false"});
+  var dbB = new CouchDB(db_name_b, {"X-Couch-Full-Commit":"false"});
 
-  dbA.deleteDb();
   dbA.createDb();
-  dbB.deleteDb();
   dbB.createDb();
 
   var ddoc = {
@@ -187,6 +189,7 @@ couchTests.view_include_docs = function(debug) {
   TEquals("undefined", typeof resp.rows[1].doc._conflicts);
 
   // cleanup
+  db.deleteDb();
   dbA.deleteDb();
   dbB.deleteDb();
 };


Mime
View raw message