~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_server.py

  • Committer: Patch Queue Manager
  • Date: 2011-10-06 08:34:03 UTC
  • mfrom: (6191.2.1 843900-url-nameerror)
  • Revision ID: pqm@pqm.ubuntu.com-20111006083403-jnsw0exlirg01aed
(mbp) error message without traceback on invalid ubuntu/debian url (bug
 843900) (Martin Pool)

Show diffs side-by-side

added added

removed removed

Lines of Context:
289
289
 
290
290
    def serve(self):
291
291
        self.serving = True
 
292
        self.stopped.clear()
292
293
        # We are listening and ready to accept connections
293
294
        self.started.set()
294
295
        try:
463
464
        if debug_threads():
464
465
            sys.stderr.write('Client thread %s started\n' % (t.name,))
465
466
        # If an exception occured during the thread start, it will get raised.
466
 
        # In rare cases, an exception raised during the request processing may
467
 
        # also get caught here (see http://pad.lv/869366)
468
467
        t.pending_exception()
469
468
 
470
469
    # The following methods are called by the main thread
520
519
            sync_event=self.server.started,
521
520
            target=self.run_server)
522
521
        self._server_thread.start()
523
 
        # Wait for the server thread to start (i.e. release the lock)
 
522
        # Wait for the server thread to start (i.e release the lock)
524
523
        self.server.started.wait()
525
524
        # Get the real address, especially the port
526
525
        self.host, self.port = self.server.server_address
617
616
            return
618
617
 
619
618
 
620
 
_DEFAULT_TESTING_CLIENT_TIMEOUT = 60.0
 
619
_DEFAULT_TESTING_CLIENT_TIMEOUT = 4.0
621
620
 
622
621
class TestingSmartServer(TestingThreadingTCPServer, server.SmartTCPServer):
623
622