diff options
author | John Christopher Anderson <jchris@apache.org> | 2008-10-08 18:42:36 +0000 |
---|---|---|
committer | John Christopher Anderson <jchris@apache.org> | 2008-10-08 18:42:36 +0000 |
commit | 15a0e50b5d75981f287a3cca982af4577633ba49 (patch) | |
tree | 358106bad983a2f0cbe9b100d24a12aeaca0b5b7 | |
parent | e0b2fe1ef01ff03ae6287409c7b0424558b13b4a (diff) |
added _restart to default.ini, and test that restart works
git-svn-id: https://svn.apache.org/repos/asf/incubator/couchdb/trunk@702960 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | etc/couchdb/default.ini.tpl.in | 1 | ||||
-rw-r--r-- | share/www/script/couch_tests.js | 8 |
2 files changed, 7 insertions, 2 deletions
diff --git a/etc/couchdb/default.ini.tpl.in b/etc/couchdb/default.ini.tpl.in index 1e5f8fe1..a2c445d3 100644 --- a/etc/couchdb/default.ini.tpl.in +++ b/etc/couchdb/default.ini.tpl.in @@ -34,6 +34,7 @@ _all_dbs = {couch_httpd_misc_handlers, handle_all_dbs_req} _config = {couch_httpd_misc_handlers, handle_config_req} _replicate = {couch_httpd_misc_handlers, handle_replicate_req} _uuids = {couch_httpd_misc_handlers, handle_uuids_req} +_restart = {couch_httpd_misc_handlers, handle_restart_req} [httpd_db_handlers] _view = {couch_httpd_view, handle_view_req} diff --git a/share/www/script/couch_tests.js b/share/www/script/couch_tests.js index d8503117..4d42ea6a 100644 --- a/share/www/script/couch_tests.js +++ b/share/www/script/couch_tests.js @@ -127,6 +127,9 @@ var tests = { // make sure we can still open the old rev of the deleted doc T(db.open(existingDoc._id, {rev: existingDoc._rev}) != null); + + // make sure restart works + T(restartServer().ok); }, // Do some edit conflict detection tests @@ -2033,8 +2036,9 @@ function repr(val) { } function restartServer() { - var xhr = CouchDB.request("POST", "/_restart"); + var reply = CouchDB.request("POST", "/_restart"); do { - xhr = CouchDB.request("GET", "/"); + var xhr = CouchDB.request("GET", "/"); } while(xhr.status != 200); + return JSON.parse(reply.responseText); } |