summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2011-10-04Merge remote branch 'apache/1.1.x'Adam Kocoloski
2011-09-29Remove usage of http module from etap testsFilipe David Borba Manana
This module is deprecated in OTP R15, which is going to be released by the end of this year. The etap tests now use ibrowse instead. This is a backport of revision 1177459 from trunk. git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/1.1.x@1177463 13f79535-47bb-0310-9956-ffa450edef68
2011-09-15Make sure view compaction terminatesFilipe David Borba Manana
If a view group is compacting and the corresponding database is shutdown by the LRU system, then the view compaction is aborted because its couch view group process shutdowns. This could lead to situations where the number of active databases is much higher than max_dbs_open and making it impossible to compact view groups. Issue reported and patch tested by Mike Leddy. Thanks. COUCHDB-1283 This is a backport of revision 1171328 from branch 1.2.x git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/1.1.x@1171329 13f79535-47bb-0310-9956-ffa450edef68
2011-09-08Fix CouchJS compatibility with older SpiderMonkey.Paul Joseph Davis
This is a backport of the work to make CouchJS build against all of the major versions of SpiderMonkey. Thanks to Randall Leeds and Chris Coulson for the original patches. Backport based on r1137464 and r1164346 Fixes COUCHDB-1078 Fixes COUCHDB-1260 git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/1.1.x@1166525 13f79535-47bb-0310-9956-ffa450edef68
2011-08-18Add missing assertions to test/etap/210-os-proc-pool.tFilipe David Borba Manana
git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/1.1.x@1159059 13f79535-47bb-0310-9956-ffa450edef68
2011-08-18Added executable bit to test/etap/210-os-proc-pool.tFilipe David Borba Manana
git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/1.1.x@1159050 13f79535-47bb-0310-9956-ffa450edef68
2011-08-18Merge revision 1159045 from trunkFilipe David Borba Manana
Fix dead lock case in the os process pool Part of this patch was done by Paul Davis. The patch also introduces a test case to validate that the os process pool (couch_query_servers) operates as it should. Closes COUCHDB-1246. git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/1.1.x@1159049 13f79535-47bb-0310-9956-ffa450edef68
2011-07-30Backport of r1152399 from trunkRandall Leeds
add an etap test for btree traversal callbacks git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/1.1.x@1152407 13f79535-47bb-0310-9956-ffa450edef68
2011-07-04Backport r1142685 from trunk: Allow "/" as vhost target.Jan Lehnardt
Includes a one-line whitespace fix. git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/1.1.x@1142689 13f79535-47bb-0310-9956-ffa450edef68
2011-06-22Merge remote-tracking branch 'upstream/1.1.x' into 0.4.xRobert Newson
Conflicts: acinclude.m4.in apps/couch/src/couch_app.erl apps/couch/src/couch_doc.erl apps/couch/src/couch_view.erl configure.ac share/www/script/test/replicator_db.js src/erlang-oauth/Makefile.am test/etap/Makefile.am
2011-06-20Fix spurious declarations of new merge conflictsRobert Newson
This patch also adds extra tests of the key tree merging logic as well as edoc-formatted documentation for the module and a few of the merge functions. Closes COUCHDB-902. Thanks Paul Davis, Bob Dionne, Klaus Trainer. backported from trunk@1065471 Conflicts: src/couchdb/couch_key_tree.erl git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/1.1.x@1137789 13f79535-47bb-0310-9956-ffa450edef68
2011-06-11Backport r113686 from trunkRandall Leeds
add 072-cleanup.t to etap Makefile.am git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/1.1.x@1134729 13f79535-47bb-0310-9956-ffa450edef68
2011-06-08backport r1133312 from trunkRandall Leeds
_view_cleanup with no _design docs - COUCHDB-1136 git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/1.1.x@1133510 13f79535-47bb-0310-9956-ffa450edef68
2011-05-17Backported os daemon tests from trunk.Paul Joseph Davis
This reduces the chance that these tests fail due to timing differences by avoding booting of an Erlang VM as an os daemon. git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/1.1.x@1104622 13f79535-47bb-0310-9956-ffa450edef68
2011-05-17backport oauth fix - COUCHDB-1144Robert Newson
git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/1.1.x@1104530 13f79535-47bb-0310-9956-ffa450edef68
2011-05-13Merged revision 1102137 from trunkFilipe David Borba Manana
Make sure view group shutdowns when database is deleted or dies Added more assertions to test 200-view-group-no-db-leaks.t to ensure this doesn't happen anymore. git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/1.1.x@1102678 13f79535-47bb-0310-9956-ffa450edef68
2011-04-28Make test count for test/etap/200-*.t deterministic.Paul Joseph Davis
This is a backport of 1097300 from trunk. git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/1.1.x@1097301 13f79535-47bb-0310-9956-ffa450edef68
2011-04-28make test case executableJan Lehnardt
git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/1.1.x@1097292 13f79535-47bb-0310-9956-ffa450edef68
2011-04-25Fix vhosts for https and fix vhost dependence on sorting ofJan Lehnardt
values in the config system which isn't guaranteed. Make vhost test cases more robust. Closes COUCHDB-1103 Source patch by Benoit and tests patch by me. git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/1.1.x@1096636 13f79535-47bb-0310-9956-ffa450edef68
2011-04-24Fixed 180 failure in distcheck.Paul Joseph Davis
VPATH builds are teh awesome. git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/1.1.x@1096354 13f79535-47bb-0310-9956-ffa450edef68
2011-04-23Merged revision 1096252 from trunkFilipe David Borba Manana
View groups: only open the databases when needed View groups keep the databases open all the time. This is a problem once the server reaches max_dbs_open open databases, as it prevents the server from closing inactive databases via the LRU system. Closes COUCHDB-1138. git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/1.1.x@1096253 13f79535-47bb-0310-9956-ffa450edef68
2011-04-23Removed test 190-json-stream-parse.t from Makefile.amFilipe David Borba Manana
This test doesn't exist in this branch and was accidently added in revision 1096099. git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/1.1.x@1096247 13f79535-47bb-0310-9956-ffa450edef68
2011-04-23Fix random errors in 173-os-daemon-cfg-register.tPaul Joseph Davis
This is a backport of 1096098 from trunk. git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/1.1.x@1096099 13f79535-47bb-0310-9956-ffa450edef68
2011-04-21More fixes for the build system.Paul Joseph Davis
git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/1.1.x@1095842 13f79535-47bb-0310-9956-ffa450edef68
2011-04-21Instead of trying to write values we just don't write values.Paul Joseph Davis
git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/1.1.x@1095585 13f79535-47bb-0310-9956-ffa450edef68
2011-04-21Do not persist config values in etap tests.Paul Joseph Davis
git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/1.1.x@1095584 13f79535-47bb-0310-9956-ffa450edef68
2011-04-21Make local_dev.ini the last file in the config chain.Paul Joseph Davis
Backport of 1095581 from trunk. git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/1.1.x@1095582 13f79535-47bb-0310-9956-ffa450edef68
2011-04-21Missing config file in EXTRA_DISTPaul Joseph Davis
git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/1.1.x@1095578 13f79535-47bb-0310-9956-ffa450edef68
2011-04-21Fix config file paths for etap tests.Paul Joseph Davis
Partial backport of 1066932 from trunk. git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/1.1.x@1095576 13f79535-47bb-0310-9956-ffa450edef68
2011-04-19Merged revision 1095200 from trunkFilipe David Borba Manana
Don't set Content-Encoding headers with value "identity" This is dictated by RFC 2616 and causes problems with Microsoft's ISA 2006 proxy. Closes COUCHDB-1128. Thanks Paul Davis and Andrew Gleave. git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/1.1.x@1095204 13f79535-47bb-0310-9956-ffa450edef68
2011-03-26Prefer local src paths for etap.Jan Lehnardt
Closes COUCHDB-1056 Patch by Randall Leeds. git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/1.1.x@1085801 13f79535-47bb-0310-9956-ffa450edef68
2011-02-02Make server listen on an unused port during unit testsAdam Kocoloski
This prevents the tests from failing when another instance of CouchDB is already running on the same machine. Also merging in the fixup of the _error resource from r1066590. COUCHDB-1049 git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/1.1.x@1066591 13f79535-47bb-0310-9956-ffa450edef68
2010-12-29Fix 180-http-proxy tests after Mochiweb upgrade.Adam Kocoloski
Content-Length and the HTTP body are returned as 0 and an empty binary instead of undefined. git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/1.1.x@1053514 13f79535-47bb-0310-9956-ffa450edef68
2010-12-29Stem revision trees after merging a path, COUCHDB-968Adam Kocoloski
git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/1.1.x@1053513 13f79535-47bb-0310-9956-ffa450edef68
2010-12-29Skip recursive path merging, COUCHDB-968Adam Kocoloski
This patch ensures that we only ever merge a linear path into the tree. It relies on the stemming code to collapse paths that could have been merged together by a recursive use of merge_one. git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/1.1.x@1053512 13f79535-47bb-0310-9956-ffa450edef68
2010-12-22Merged revision 1052031 from trunk:Filipe David Borba Manana
Make sure attachments get compressed when their MIME type lists parameters Closes COUCHDB-996. git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/1.1.x@1052032 13f79535-47bb-0310-9956-ffa450edef68
2010-12-08Change key_tree merge to take path as 2nd arg, add type specsAdam Kocoloski
git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/1.1.x@1043462 13f79535-47bb-0310-9956-ffa450edef68
2010-12-08Prefer values from old tree when merging, COUCHDB-968Adam Kocoloski
This commit represents a substantial refactor of the key tree merging logic, some of which is not strictly necessary for the resolution of COUCHDB-968. Two etap test cases checking the ability to merge in a non-linear tree are removed because the functionality is no longer supported. CouchDB only ever merged a linear revision history into an existing revision tree. git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/1.1.x@1043460 13f79535-47bb-0310-9956-ffa450edef68
2010-11-19Make sure that after a local database compaction the old database reference ↵Filipe David Borba Manana
counters don't get unreleased forever because of a continuous (or long) replication is going on. Same type of issue as in COUCHDB-926. Thanks Adam Kocoloski for some suggestions. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@1036705 13f79535-47bb-0310-9956-ffa450edef68
2010-11-12Proper verification of the request's accepted media types. Uses the new ↵Filipe David Borba Manana
function mochiweb_request:accepts_content_type/1. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@1034554 13f79535-47bb-0310-9956-ffa450edef68
2010-11-11Micro optimization: when reading an iolist, read up to 8Kbs instead of the 4 ↵Filipe David Borba Manana
bytes length prefix only in the first file read operation. For reads of small terms/iolist (up to 8Kbs), this speeds up the whole operation. No impact on larger terms/iolists. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@1033790 13f79535-47bb-0310-9956-ffa450edef68
2010-11-08Preserve attachment identity length when doing local to local replications.Filipe David Borba Manana
Closes COUCHDB-930. Patch by Juuso Väänänen. Thanks. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@1032673 13f79535-47bb-0310-9956-ffa450edef68
2010-11-08Fixed a couple typos.Paul Joseph Davis
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@1032637 13f79535-47bb-0310-9956-ffa450edef68
2010-11-06Fix executable status.Paul Joseph Davis
I must've tried to set svn:executable before doing an svn add. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@1031888 13f79535-47bb-0310-9956-ffa450edef68
2010-11-05Don't choke on unknown configuration settings.Paul Joseph Davis
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@1031884 13f79535-47bb-0310-9956-ffa450edef68
2010-11-05HTTP proxy handler.Paul Joseph Davis
The second of two new features to replace the _externals protocols. This allows users to configure CouchDB to proxy requests to an external HTTP server. The external HTTP server is not required to be on the same host running CouchDB. The configuration looks like such: [httpd_global_handlers] _google = {couch_httpd_proxy, handle_proxy_req, <<"http://www.google.com">>} You can then hit this proxy at the url: http://127.0.0.1:5984/_google If you add any path after the proxy name, or make a request with a query string, those will be appended to the URL specified in the configuration. Ie: http://127.0.0.1:5984/_google/search?q=plankton would translate to: http://www.google.com/search?q=plankton Obviously, request bodies are handled as expected. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@1031877 13f79535-47bb-0310-9956-ffa450edef68
2010-11-05Enable CouchDB to manage OS process daemons.Paul Joseph Davis
This is a simple feature that allows useres to configure CouchDB so that it maintains a given OS level process alive. If the process dies for any reason, CouchDB will restart it. If the process restarts too often, then CouchDB will mark it has halted and not attempt to restart it. The default max restart rate is three times in the last five seconds. These parameters are adjustable. Commands that are started in this manner will have access to a simple API over stdio to request configuration parameters or to add log statements to CouchDB's logs. To configure an OS process as a CouchDB os_daemon, create a section in your local.ini like such: [os_daemons] daemon_name = /path/to/command -with args This will make CouchDB bring up the command and attempt to keep it alive. To request a configuration parameter, an os_daemon can write a simple JSON message to stdout like such: ["get", "os_daemons"]\n which would return: {"daemon_name": "/path/to/command -with args"} Or: ["get", "os_daemons", "daemon_name"]\n which would return: "/path/to/command -with args" There's no restriction on what configuration variables are visible. There's also no method for altering the configuration. If you would like your OS daemon to be restarted in the event that the configuration changes, you can send the following messages: ["register", $(SECTION)]\n When anyting in that section changes, your OS process will be rebooted so it can pick up the new configuration settings. If you want to listen for changes on a specific key, you can send something like: ["register", $(SECTION), $(KEY)]\n In this case, CouchDB will only restart your daemon if that exact section/key pair changes, instead of anything in that entire section. Logging commands look like: ["log", $(JSON_MESSAGE)]\n Where $(JSON_MESSAGE) is arbitrary JSON data. These messages are logged at the 'info' level. If you want to log at a different level you can pass messages like such: ["log", $(JSON_MESSAGE), {"level": $(LEVEL)}]\n Where $(LEVEL) is one of "debug", "info", or "error". When implementing a daemon process to be managed by CouchDB you should remember to use a method like checking the parent process id or if stdin has been closed. These flags can tell you if your daemon process has been orphaned so you can exit cleanly. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@1031875 13f79535-47bb-0310-9956-ffa450edef68
2010-09-08make sure we always do a plan.Benoit Chesneau
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@993567 13f79535-47bb-0310-9956-ffa450edef68
2010-09-07fix issue #COUCHDB-230 . now it's possible to do */test =Benoit Chesneau
/db/_design/test or even example.com/test = /db/_design/test and other stuff already possible with vhost manager. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@993558 13f79535-47bb-0310-9956-ffa450edef68
2010-08-20sysadmins were shocked that we can use $ for anything else than a shellBenoit Chesneau
environment variable. use ":" instead. use ":" instead like we do in _rewrite handler. like we do in _rewrite handler. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@987384 13f79535-47bb-0310-9956-ffa450edef68