couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jch...@apache.org
Subject svn commit: r702960 - in /incubator/couchdb/trunk: etc/couchdb/default.ini.tpl.in share/www/script/couch_tests.js
Date Wed, 08 Oct 2008 18:42:36 GMT
Author: jchris
Date: Wed Oct  8 11:42:36 2008
New Revision: 702960

URL: http://svn.apache.org/viewvc?rev=702960&view=rev
Log:
added _restart to default.ini, and test that restart works

Modified:
    incubator/couchdb/trunk/etc/couchdb/default.ini.tpl.in
    incubator/couchdb/trunk/share/www/script/couch_tests.js

Modified: incubator/couchdb/trunk/etc/couchdb/default.ini.tpl.in
URL: http://svn.apache.org/viewvc/incubator/couchdb/trunk/etc/couchdb/default.ini.tpl.in?rev=702960&r1=702959&r2=702960&view=diff
==============================================================================
--- incubator/couchdb/trunk/etc/couchdb/default.ini.tpl.in (original)
+++ incubator/couchdb/trunk/etc/couchdb/default.ini.tpl.in Wed Oct  8 11:42:36 2008
@@ -34,6 +34,7 @@
 _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}

Modified: incubator/couchdb/trunk/share/www/script/couch_tests.js
URL: http://svn.apache.org/viewvc/incubator/couchdb/trunk/share/www/script/couch_tests.js?rev=702960&r1=702959&r2=702960&view=diff
==============================================================================
--- incubator/couchdb/trunk/share/www/script/couch_tests.js [utf-8] (original)
+++ incubator/couchdb/trunk/share/www/script/couch_tests.js [utf-8] Wed Oct  8 11:42:36 2008
@@ -127,6 +127,9 @@
 
     // 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 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);
 }



Mime
View raw message