You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ja...@apache.org on 2008/06/15 19:29:05 UTC
svn commit: r667978 - in /incubator/couchdb/branches/runtimeconfig:
etc/couchdb/couch.ini.tpl.in share/www/script/couch_tests.js
src/couchdb/couch_server_sup.erl
Author: jan
Date: Sun Jun 15 10:29:04 2008
New Revision: 667978
URL: http://svn.apache.org/viewvc?rev=667978&view=rev
Log:
Restore current info-output behaviour
Merge test-suite fixes from trunk. All tests pass now!
Modified:
incubator/couchdb/branches/runtimeconfig/etc/couchdb/couch.ini.tpl.in
incubator/couchdb/branches/runtimeconfig/share/www/script/couch_tests.js
incubator/couchdb/branches/runtimeconfig/src/couchdb/couch_server_sup.erl
Modified: incubator/couchdb/branches/runtimeconfig/etc/couchdb/couch.ini.tpl.in
URL: http://svn.apache.org/viewvc/incubator/couchdb/branches/runtimeconfig/etc/couchdb/couch.ini.tpl.in?rev=667978&r1=667977&r2=667978&view=diff
==============================================================================
--- incubator/couchdb/branches/runtimeconfig/etc/couchdb/couch.ini.tpl.in (original)
+++ incubator/couchdb/branches/runtimeconfig/etc/couchdb/couch.ini.tpl.in Sun Jun 15 10:29:04 2008
@@ -4,6 +4,7 @@
RootDirectory=%pkgstatelibdir%
UtilDriverDir=%couchprivlibdir%
MaximumDocumentSize=4294967296 ; 4 GB
+StartupMessage=Apache CouchDB is starting.
[HTTPd]
Port=5984
Modified: incubator/couchdb/branches/runtimeconfig/share/www/script/couch_tests.js
URL: http://svn.apache.org/viewvc/incubator/couchdb/branches/runtimeconfig/share/www/script/couch_tests.js?rev=667978&r1=667977&r2=667978&view=diff
==============================================================================
--- incubator/couchdb/branches/runtimeconfig/share/www/script/couch_tests.js [utf-8] (original)
+++ incubator/couchdb/branches/runtimeconfig/share/www/script/couch_tests.js [utf-8] Sun Jun 15 10:29:04 2008
@@ -539,11 +539,11 @@
if (debug) debugger;
var binAttDoc = {
- _id:"bin_doc",
+ _id: "bin_doc",
_attachments:{
"foo.txt": {
- "content-type":"text/plain",
- "data": "VGhpcyBpcyBhIGJhc2U2NCBlbmNvZGVkIHRleHQ="
+ content_type:"text/plain",
+ data: "VGhpcyBpcyBhIGJhc2U2NCBlbmNvZGVkIHRleHQ="
}
}
}
@@ -552,7 +552,7 @@
var xhr = CouchDB.request("GET", "/test_suite_db/bin_doc/foo.txt");
T(xhr.responseText == "This is a base64 encoded text")
- T(xhr.getResponseHeader("content-type") == "text/plain")
+ T(xhr.getResponseHeader("Content-Type") == "text/plain")
},
content_negotiation: function(debug) {
@@ -652,7 +652,6 @@
restartServer();
T(db.open(designDoc._id) == null);
T(db.view("test/no_docs") == null);
-
},
view_collation: function(debug) {
@@ -931,15 +930,16 @@
replication: function(debug) {
if (debug) debugger;
+ var host = window.location.host;
var dbPairs = [
{source:"test_suite_db_a",
target:"test_suite_db_b"},
{source:"test_suite_db_a",
- target:"http://localhost:5984/test_suite_db_b"},
- {source:"http://localhost:5984/test_suite_db_a",
+ target:"http://" + host + "/test_suite_db_b"},
+ {source:"http://" + host + "/test_suite_db_a",
target:"test_suite_db_b"},
- {source:"http://localhost:5984/test_suite_db_a",
- target:"http://localhost:5984/test_suite_db_b"}
+ {source:"http://" + host + "/test_suite_db_a",
+ target:"http://" + host + "/test_suite_db_b"}
]
var dbA = new CouchDB("test_suite_db_a");
var dbB = new CouchDB("test_suite_db_b");
@@ -1100,7 +1100,7 @@
xhr = CouchDB.request("DELETE", "/test_suite_db/1", {
headers: {"if-match": etag}
});
- T(xhr.status == 202)
+ T(xhr.status == 200)
},
compact: function(debug) {
@@ -1112,13 +1112,12 @@
var saveResult = db.bulkSave(docs);
T(saveResult.ok);
-
var binAttDoc = {
- _id:"bin_doc",
+ _id: "bin_doc",
_attachments:{
"foo.txt": {
- "content-type":"text/plain",
- "data": "VGhpcyBpcyBhIGJhc2U2NCBlbmNvZGVkIHRleHQ="
+ content_type:"text/plain",
+ data: "VGhpcyBpcyBhIGJhc2U2NCBlbmNvZGVkIHRleHQ="
}
}
}
@@ -1135,20 +1134,18 @@
var xhr = CouchDB.request("POST", "/test_suite_db/_compact");
T(xhr.status == 202);
- //compaction isn't instantaneous, loop until done
- while(db.info().compact_running) {};
-
-
+ // compaction isn't instantaneous, loop until done
+ while (db.info().compact_running) {};
var xhr = CouchDB.request("GET", "/test_suite_db/bin_doc/foo.txt");
T(xhr.responseText == "This is a base64 encoded text")
- T(xhr.getResponseHeader("content-type") == "text/plain")
+ T(xhr.getResponseHeader("Content-Type") == "text/plain")
var compactedsize = db.info().disk_size;
- T(deletesize > originalsize);
- },
-
+ T(compactedsize < deletesize);
+ },
+
runtime_config: function(debug) {
if(debug) debugger;
var xhr;
@@ -1371,4 +1368,4 @@
do {
xhr = CouchDB.request("GET", "/");
} while(xhr.status != 200);
-}
+}
\ No newline at end of file
Modified: incubator/couchdb/branches/runtimeconfig/src/couchdb/couch_server_sup.erl
URL: http://svn.apache.org/viewvc/incubator/couchdb/branches/runtimeconfig/src/couchdb/couch_server_sup.erl?rev=667978&r1=667977&r2=667978&view=diff
==============================================================================
--- incubator/couchdb/branches/runtimeconfig/src/couchdb/couch_server_sup.erl (original)
+++ incubator/couchdb/branches/runtimeconfig/src/couchdb/couch_server_sup.erl Sun Jun 15 10:29:04 2008
@@ -123,9 +123,10 @@
couch_server:get_version(),
couch_config:lookup({"Log", "Level"})
]),
+
io:format("~s~n~n", [couch_config:lookup({"CouchDB", "StartupMessage"})]),
- couch_util:start_driver(couch_config:lookup({"CouchDB", "UtilDriverDir"})),
+ ok = couch_util:start_driver(),
% ensure these applications are running
application:start(inets),
@@ -135,8 +136,6 @@
StartResult = (catch supervisor:start_link(
{local, couch_server_sup}, couch_server_sup, ChildProcesses)),
- io:format("start result: '~p'", [StartResult]),
-
case StartResult of
{ok,_} ->
% only output when startup was successful