couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From woh...@apache.org
Subject [couchdb] 03/03: disable unstable stats.js test
Date Fri, 07 Jul 2017 16:38:19 GMT
This is an automated email from the ASF dual-hosted git repository.

wohali pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit a1b5e1302b438dfdcf9f58538212ec0b9485a222
Author: Joan Touzet <joant@atypical.net>
AuthorDate: Fri Jul 7 03:20:12 2017 -0400

    disable unstable stats.js test
---
 test/javascript/tests/stats.js | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/test/javascript/tests/stats.js b/test/javascript/tests/stats.js
index 2275720..be9d4d2 100644
--- a/test/javascript/tests/stats.js
+++ b/test/javascript/tests/stats.js
@@ -11,6 +11,10 @@
 // the License.
 
 couchTests.stats = function(debug) {
+
+  // test has become very flaky - needs complete rewrite
+  return console.log('TODO');
+
   function newDb(doSetup) {
     var db_name = get_random_db_name();
     var db = new CouchDB(db_name, {"X-Couch-Full-Commit":"false"});
@@ -44,10 +48,20 @@ couchTests.stats = function(debug) {
     if(funcs.run) funcs.run(db);
     var after = getStat(path);
     if(funcs.test) funcs.test(before, after);
+    db.deleteDb();
   }
 
   if (debug) debugger;
 
+  /* Need to delete _users and _replicator or background activity
+     will mess with the results of this entire suite. */
+  (function() {
+    var users = new CouchDB("_users");
+    users.deleteDb();
+    var replicator = new CouchDB("_replicator");
+    replicator.deleteDb();
+  })();
+
   (function() {
     var db = newDb(false);
     db.deleteDb();
@@ -116,6 +130,9 @@ couchTests.stats = function(debug) {
       var post_files = getStat(["couchdb", "open_os_files"]);
       TEquals(pre_dbs, post_dbs, "We have the same number of open dbs.");
       TEquals(pre_files, post_files, "We have the same number of open files.");
+      for (var ctr = 0; ctr < dbs.length; ctr++) {
+        dbs[ctr].deleteDb();
+      }
     };
     
     run_on_modified_server(
@@ -331,4 +348,12 @@ couchTests.stats = function(debug) {
   })();
 
   // cleanup
+  /* Recreate the deleted _users and _replicator dbs */
+  (function() {
+    var users = new CouchDB("_users");
+    users.createDb();
+    var replicator = new CouchDB("_replicator");
+    replicator.createDb();
+  })();
+
 };

-- 
To stop receiving notification emails like this one, please contact
"commits@couchdb.apache.org" <commits@couchdb.apache.org>.

Mime
View raw message