diff options
author | Damien F. Katz <damien@apache.org> | 2009-04-10 02:21:37 +0000 |
---|---|---|
committer | Damien F. Katz <damien@apache.org> | 2009-04-10 02:21:37 +0000 |
commit | 1df631f8653fefdda8d852b39f4ca9aec46f69da (patch) | |
tree | b689897a497fed4599a68d96322023a4782573a2 /share/www/script/test | |
parent | 7db96420155d3fe6b6d8b5eaa10660a65d19b8cc (diff) |
Fixes for leaked file handles, with test.
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@763858 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'share/www/script/test')
-rw-r--r-- | share/www/script/test/basics.js | 8 | ||||
-rw-r--r-- | share/www/script/test/stats.js | 6 |
2 files changed, 8 insertions, 6 deletions
diff --git a/share/www/script/test/basics.js b/share/www/script/test/basics.js index 4571200e..8adf5a84 100644 --- a/share/www/script/test/basics.js +++ b/share/www/script/test/basics.js @@ -29,10 +29,10 @@ couchTests.basics = function(debug) { if (debug) debugger; // creating a new DB should return Location header - xhr = CouchDB.request("DELETE", "/new-db"); - xhr = CouchDB.request("PUT", "/new-db"); - TEquals("/new-db", - xhr.getResponseHeader("Location").substr(-7), + xhr = CouchDB.request("DELETE", "/test_suite_db"); + xhr = CouchDB.request("PUT", "/test_suite_db"); + TEquals("/test_suite_db", + xhr.getResponseHeader("Location").substr(-14), "should return Location header to newly created document"); TEquals("http://", diff --git a/share/www/script/test/stats.js b/share/www/script/test/stats.js index 267a48ef..dc3edb1f 100644 --- a/share/www/script/test/stats.js +++ b/share/www/script/test/stats.js @@ -56,7 +56,8 @@ couchTests.stats = function(debug) { value: max.toString()}], function () { - var files_open = requestStatsTest("couchdb", "open_databases").current; + var dbs_open = requestStatsTest("couchdb", "open_databases").current; + var files_open = requestStatsTest("couchdb", "open_os_files").current; for(var i=0; i<max+1; i++) { var db = new CouchDB("test_suite_db" + i); db.deleteDb(); @@ -70,7 +71,8 @@ couchTests.stats = function(debug) { var db = new CouchDB("test_suite_db" + i); db.deleteDb(); } - T(files_open == requestStatsTest("couchdb", "open_databases").current); + T(dbs_open == requestStatsTest("couchdb", "open_databases").current); + T(files_open == requestStatsTest("couchdb", "open_os_files").current); }) }, }; |