summaryrefslogtreecommitdiff
path: root/share/www
diff options
context:
space:
mode:
authorDamien F. Katz <damien@apache.org>2009-01-19 23:31:51 +0000
committerDamien F. Katz <damien@apache.org>2009-01-19 23:31:51 +0000
commit06a084d40de16f72b6278a63f4c06c2d2b0c9281 (patch)
treee0a9343947bd2446684c31a5d23231f88e07ac75 /share/www
parent40aa5a760553eda80fbe06e9a00dee85adc01765 (diff)
tests for fix to COUCHDB-215, and changing of how max_dbs_open setting is handled at runtime.
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@735875 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'share/www')
-rw-r--r--share/www/script/couch_tests.js33
1 files changed, 32 insertions, 1 deletions
diff --git a/share/www/script/couch_tests.js b/share/www/script/couch_tests.js
index de4f03db..dbdc27ce 100644
--- a/share/www/script/couch_tests.js
+++ b/share/www/script/couch_tests.js
@@ -2860,7 +2860,38 @@ var tests = {
// Now delete document
T(user2Db.deleteDoc(doc).ok);
});
- }
+ },
+
+
+ max_dbs_open : function(debug) {
+ if (debug) debugger;
+ restartServer();
+ var max = 5;
+ run_on_modified_server(
+ [{section: "couchdb",
+ key: "max_dbs_open",
+ value: max.toString()}],
+
+ function () {
+ for(var i=0; i<max*2; i++) {
+ var db = new CouchDB("test_suite_db"+ i);
+ db.deleteDb();
+ db.createDb();
+ }
+
+ var stats = JSON.parse(CouchDB.request("GET", "/_stats").responseText);
+ T(stats.dbs_open == max);
+
+
+ for(var i=0; i<max*2; i++) {
+ var db = new CouchDB("test_suite_db"+ i);
+ db.deleteDb();
+ }
+
+ var stats = JSON.parse(CouchDB.request("GET", "/_stats").responseText);
+ T(stats.dbs_open == 0);
+ })
+ },
};
function makeDocs(start, end, templateDoc) {