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

Merge sftp-leaks into catch-them-all

Show diffs side-by-side

added added

removed removed

Lines of Context:
262
262
        self.exception = None
263
263
        self.ignored_exceptions = None # see set_ignored_exceptions
264
264
 
 
265
    # compatibility thunk for python-2.4 and python-2.5...
 
266
    name = property(threading.Thread.getName, threading.Thread.setName)
 
267
 
265
268
    def set_event(self, event):
266
269
        self.ready = event
267
270
 
560
563
        self.server = self.create_server()
561
564
        self._server_thread = ThreadWithException(
562
565
            event=self.server.started,
563
 
            name='(%s:%s)' % (self.host, self.port),
564
566
            target=self.run_server)
565
567
        self._server_thread.start()
566
568
        # Wait for the server thread to start (i.e release the lock)
567
569
        self.server.started.wait()
568
 
        if debug_threads():
569
 
            print 'Server thread %s started' % (self._server_thread.name,)
570
570
        # Get the real address, especially the port
571
571
        self.host, self.port = self.server.server_address
 
572
        self._server_thread.name = self.server.server_address
 
573
        if debug_threads():
 
574
            print 'Server thread %s started' % (self._server_thread.name,)
572
575
        # If an exception occured during the server start, it will get raised,
573
576
        # otherwise, the server is blocked on its accept() call.
574
577
        self._server_thread.pending_exception()