Hi,

the attached patch changes the implementation in mod_authz_svn_tests'
verify_get() function and uses the common http-connection setup code
from svntest.main.

This has the side-effect of resolving a test failure I was running into
when running ra_serf/https tests on my machine (see [1] for details).

Credits for this also go to danielsh, with whom the problem was
discussed on IRC.

[[[
Use the common function to create http connection throughout the test suite.

Note: This also resolves test failures when running the mod_authz_svn
tests on
certain set ups.

* subversion/tests/cmdline/mod_authz_svn_tests.py
  (verify_get): use svn.test.create_http_connection rather than its separate
   code to establish a httpd connection
]]]

Regards,
Stefan

[1] http://luke1410.de:8090/browse/MAXSVN-99

Index: subversion/tests/cmdline/mod_authz_svn_tests.py
===================================================================
--- subversion/tests/cmdline/mod_authz_svn_tests.py     (revision 1771118)
+++ subversion/tests/cmdline/mod_authz_svn_tests.py     (working copy)
@@ -101,26 +101,12 @@
 
 def verify_get(test_area_url, path, user, pw,
                expected_status, expected_body, headers):
-  try:
-    # Python <3.0
-    import httplib
-    from urlparse import urlparse
-  except ImportError:
-    # Python >=3.0
-    import http.client as httplib
-    from urllib.parse import urlparse
-
   import base64
 
   req_url = test_area_url + path
 
-  loc = urlparse(req_url)
+  h = svntest.main.create_http_connection(req_url)
 
-  if loc.scheme == 'http':
-    h = httplib.HTTPConnection(loc.hostname, loc.port)
-  else:
-    h = httplib.HTTPSConnection(loc.hostname, loc.port)
-
   if headers is None:
     headers = {}
 

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to