couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject [47/50] couchdb commit: updated refs/heads/2876-js-tests-merged-squashed to f44e15f
Date Wed, 16 Dec 2015 19:52:42 GMT
JS test: update view_pagination.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/50b5a471
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/50b5a471
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/50b5a471

Branch: refs/heads/2876-js-tests-merged-squashed
Commit: 50b5a471572a2852a8f0c09a5850e586a69a8df6
Parents: 3a16cf6
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_pagination.js | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/50b5a471/test/javascript/tests/view_pagination.js
----------------------------------------------------------------------
diff --git a/test/javascript/tests/view_pagination.js b/test/javascript/tests/view_pagination.js
index ed3a7ee..df5390e 100644
--- a/test/javascript/tests/view_pagination.js
+++ b/test/javascript/tests/view_pagination.js
@@ -11,8 +11,8 @@
 // the License.
 
 couchTests.view_pagination = function(debug) {
-    var db = new CouchDB("test_suite_db", {"X-Couch-Full-Commit":"false"});
-    db.deleteDb();
+    var db_name = get_random_db_name();
+    var db = new CouchDB(db_name, {"X-Couch-Full-Commit":"false"});
     db.createDb();
     if (debug) debugger;
 
@@ -30,7 +30,7 @@ couchTests.view_pagination = function(debug) {
         limit: 10
       });
       T(queryResults.rows.length == 10);
-      T(queryResults.total_rows == docs.length);
+      TEquals(docs.length, queryResults.total_rows, "doc.length should match query.length");
       T(queryResults.offset == i);
       var j;
       for (j = 0; j < 10;j++) {
@@ -144,4 +144,6 @@ couchTests.view_pagination = function(debug) {
     });
     testEndkeyDocId(queryResults);
 
+    // cleanup
+    db.deleteDb();
   };


Mime
View raw message