Skip to content

Commit

Permalink
disable unstable stats.js test
Browse files Browse the repository at this point in the history
  • Loading branch information
wohali committed Jul 7, 2017
1 parent 7885d80 commit a1b5e13
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions test/javascript/tests/stats.js
Expand Up @@ -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"});
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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();
})();

};

0 comments on commit a1b5e13

Please sign in to comment.