summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoan Touzet <joant@atypical.net>2017-07-07 03:20:12 -0400
committerJoan Touzet <wohali@users.noreply.github.com>2017-07-07 12:38:13 -0400
commita1b5e1302b438dfdcf9f58538212ec0b9485a222 (patch)
treef9fcd2b47479b0fb5407509cdbfb324d7f721924
parent7885d80db6dbf4668c1b5b00c334de2942767dd4 (diff)
downloadcouchdb-a1b5e1302b438dfdcf9f58538212ec0b9485a222.tar.gz
disable unstable stats.js test
-rw-r--r--test/javascript/tests/stats.js25
1 files changed, 25 insertions, 0 deletions
diff --git a/test/javascript/tests/stats.js b/test/javascript/tests/stats.js
index 22757200f..be9d4d239 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();
+ })();
+
};