couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kocol...@apache.org
Subject svn commit: r1066590 - in /couchdb/trunk/test/etap: 180-http-proxy.ini 180-http-proxy.t
Date Wed, 02 Feb 2011 19:05:56 GMT
Author: kocolosk
Date: Wed Feb  2 19:05:56 2011
New Revision: 1066590

URL: http://svn.apache.org/viewvc?rev=1066590&view=rev
Log:
Move _error resource config to startup

This avoids a race condition where the HTTP daemon would restart but
not load the _error proxy route.

Added:
    couchdb/trunk/test/etap/180-http-proxy.ini
Modified:
    couchdb/trunk/test/etap/180-http-proxy.t

Added: couchdb/trunk/test/etap/180-http-proxy.ini
URL: http://svn.apache.org/viewvc/couchdb/trunk/test/etap/180-http-proxy.ini?rev=1066590&view=auto
==============================================================================
--- couchdb/trunk/test/etap/180-http-proxy.ini (added)
+++ couchdb/trunk/test/etap/180-http-proxy.ini Wed Feb  2 19:05:56 2011
@@ -0,0 +1,20 @@
+; Licensed to the Apache Software Foundation (ASF) under one
+; or more contributor license agreements.  See the NOTICE file
+; distributed with this work for additional information
+; regarding copyright ownership.  The ASF licenses this file
+; to you under the Apache License, Version 2.0 (the
+; "License"); you may not use this file except in compliance
+; with the License.  You may obtain a copy of the License at
+; 
+;   http://www.apache.org/licenses/LICENSE-2.0
+;
+; Unless required by applicable law or agreed to in writing,
+; software distributed under the License is distributed on an
+; "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+; KIND, either express or implied.  See the License for the
+; specific language governing permissions and limitations
+; under the License.
+
+; 49151 is IANA Reserved, let's assume no one is listening there
+[httpd_global_handlers]
+_error = {couch_httpd_proxy, handle_proxy_req, <<"http://127.0.0.1:49151/">>}

Modified: couchdb/trunk/test/etap/180-http-proxy.t
URL: http://svn.apache.org/viewvc/couchdb/trunk/test/etap/180-http-proxy.t?rev=1066590&r1=1066589&r2=1066590&view=diff
==============================================================================
--- couchdb/trunk/test/etap/180-http-proxy.t (original)
+++ couchdb/trunk/test/etap/180-http-proxy.t Wed Feb  2 19:05:56 2011
@@ -67,7 +67,10 @@ check_request(Name, Req, Remote, Local) 
     Resp.
 
 test() ->
-    couch_server_sup:start_link(test_util:config_files()),
+    couch_server_sup:start_link([
+        test_util:build_file("test/etap/180-http-proxy.ini") |
+        test_util:config_files()
+    ]),
     ibrowse:start(),
     crypto:start(),
 
@@ -79,12 +82,6 @@ test() ->
         "/\">>}"
     ]),
     couch_config:set("httpd_global_handlers", "_test", Url, false),
-    
-    % 49151 is IANA Reserved, let's assume no one is listening there
-    couch_config:set("httpd_global_handlers", "_error",
-        "{couch_httpd_proxy, handle_proxy_req,<<\"http://127.0.0.1:49151/\">>}",
-        false
-    ),
 
     % let couch_httpd restart
     timer:sleep(100),



Mime
View raw message