/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/http_utils.py

  • Committer: Robert Collins
  • Date: 2009-08-27 22:17:35 UTC
  • mto: This revision was merged to the branch mainline in revision 4663.
  • Revision ID: robertc@robertcollins.net-20090827221735-dck1jb1uhktda57h
Refactor creation and shutdown of test servers to use a common helper,
reducing duplicated code, fixing a number of small race conditions where
servers may not get shut down and making tests that use such servers a
little easier to read.

Show diffs side-by-side

added added

removed removed

Lines of Context:
133
133
        """Get the server instance for the secondary transport."""
134
134
        if self.__secondary_server is None:
135
135
            self.__secondary_server = self.create_transport_secondary_server()
136
 
            self.__secondary_server.setUp()
137
 
            self.addCleanup(self.__secondary_server.tearDown)
 
136
            self.start_server(self.__secondary_server)
138
137
        return self.__secondary_server
139
138
 
140
139