summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
Diffstat (limited to 'share')
-rw-r--r--share/www/script/couch_tests.js8
1 files changed, 6 insertions, 2 deletions
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);
}