You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Stefan <lu...@gmx.de> on 2017/02/12 20:29:28 UTC
[PATCH] Use consistent HTTP connection setup code throughout test
suite
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
Re: [PATCH] Use consistent HTTP connection setup code throughout test
suite
Posted by Stefan <lu...@posteo.de>.
Hi Kotkov,
On 2/16/2017 21:44, Evgeny Kotkov wrote:
> Stefan Hett <lu...@posteo.de> writes:
>
>> Committed in r1782893 with a slightly modified log message.
>> - loc = urlparse(req_url)
>> -
>> - if loc.scheme == 'http':
>> - h = httplib.HTTPConnection(loc.hostname, loc.port)
>> - else:
>> - h = httplib.HTTPSConnection(loc.hostname, loc.port)
>> + h = svntest.main.create_http_connection(req_url)
> Hi Stefan,
>
> The create_http_connection() function also accepts a 'debuglevel', which
> defaults to full debug output. The code before this change didn't enable
> debugging for the HTTP connections, but now it does, and this makes
>
> win-tests.py -t mod_authz_svn_tests.py --log-to-stdout
>
> pretty much unusable.
>
> Perhaps, it would be better to pass debuglevel=0 here to match the
> original behavior?
Thanks for taking the time to review the commit.
The other usages of the function (see lock_tests.py and
mod_dav_svn_tests.py) already use the default debuglevel. If the
--log-to-stdout output is too noisy with the debuglevel being set to 9,
shouldn't these be changed as well?
For now I've restored the previous behavior in r1783324 and set the
debuglevel back to 0 for the caller in mod_authz_svn_tests.py, restoring
its previous behavior as per your suggestion.
Regards,
Stefan
Re: [PATCH] Use consistent HTTP connection setup code throughout test suite
Posted by Evgeny Kotkov <ev...@visualsvn.com>.
Stefan Hett <lu...@posteo.de> writes:
> Committed in r1782893 with a slightly modified log message.
> - loc = urlparse(req_url)
> -
> - if loc.scheme == 'http':
> - h = httplib.HTTPConnection(loc.hostname, loc.port)
> - else:
> - h = httplib.HTTPSConnection(loc.hostname, loc.port)
> + h = svntest.main.create_http_connection(req_url)
Hi Stefan,
The create_http_connection() function also accepts a 'debuglevel', which
defaults to full debug output. The code before this change didn't enable
debugging for the HTTP connections, but now it does, and this makes
win-tests.py -t mod_authz_svn_tests.py --log-to-stdout
pretty much unusable.
Perhaps, it would be better to pass debuglevel=0 here to match the
original behavior?
Regards,
Evgeny Kotkov
Re: [PATCH] Use consistent HTTP connection setup code throughout test
suite
Posted by Stefan <lu...@posteo.de>.
On 2/12/2017 21:29, Stefan wrote:
> 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
>
Committed in r1782893 with a slightly modified log message.
Regards,
Stefan