/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_http.py

  • Committer: Robert Collins
  • Date: 2010-07-04 06:22:11 UTC
  • mto: This revision was merged to the branch mainline in revision 5332.
  • Revision ID: robertc@robertcollins.net-20100704062211-tk9hw6bnsn5x47fm
``bzrlib.lsprof.profile`` will no longer silently generate bad threaded
profiles when concurrent profile requests are made. Instead the profile
requests will be serialised. Reentrant requests will now deadlock.
(Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
89
89
                            _qualified_prefix='http+pycurl',)))
90
90
    tests.multiply_tests(t_tests, transport_scenarios, result)
91
91
 
 
92
    protocol_scenarios = [
 
93
            ('HTTP/1.0',  dict(_protocol_version='HTTP/1.0')),
 
94
            ('HTTP/1.1',  dict(_protocol_version='HTTP/1.1')),
 
95
            ]
 
96
 
 
97
    # some tests are parametrized by the protocol version only
 
98
    p_tests, remaining_tests = tests.split_suite_by_condition(
 
99
        remaining_tests, tests.condition_isinstance((
 
100
                TestAuthOnRedirected,
 
101
                )))
 
102
    tests.multiply_tests(p_tests, protocol_scenarios, result)
 
103
 
92
104
    # each implementation tested with each HTTP version
93
105
    tp_tests, remaining_tests = tests.split_suite_by_condition(
94
106
        remaining_tests, tests.condition_isinstance((
103
115
                TestRanges,
104
116
                TestSpecificRequestHandler,
105
117
                )))
106
 
    protocol_scenarios = [
107
 
            ('HTTP/1.0',  dict(_protocol_version='HTTP/1.0')),
108
 
            ('HTTP/1.1',  dict(_protocol_version='HTTP/1.1')),
109
 
            ]
110
118
    tp_scenarios = tests.multiply_scenarios(transport_scenarios,
111
119
                                            protocol_scenarios)
112
120
    tests.multiply_tests(tp_tests, tp_scenarios, result)
2156
2164
    _transport = _urllib.HttpTransport_urllib
2157
2165
 
2158
2166
    def create_transport_readonly_server(self):
2159
 
        return self._auth_server()
 
2167
        return self._auth_server(protocol_version=self._protocol_version)
2160
2168
 
2161
2169
    def create_transport_secondary_server(self):
2162
2170
        """Create the secondary server redirecting to the primary server"""
2163
2171
        new = self.get_readonly_server()
2164
2172
 
2165
 
        redirecting = http_utils.HTTPServerRedirecting()
 
2173
        redirecting = http_utils.HTTPServerRedirecting(
 
2174
            protocol_version=self._protocol_version)
2166
2175
        redirecting.redirect_to(new.host, new.port)
2167
2176
        return redirecting
2168
2177