~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/stub_sftp.py

  • Committer: Andrew Bennetts
  • Date: 2010-05-10 12:12:35 UTC
  • mto: This revision was merged to the branch mainline in revision 5219.
  • Revision ID: andrew.bennetts@canonical.com-20100510121235-4v1yj2hip4fp39gr
Add more logging that will hopefully help diagnose intermittent failures in test_bzr_connect_to_bzr_ssh.

Show diffs side-by-side

added added

removed removed

Lines of Context:
283
283
        self._socket.close()
284
284
 
285
285
    def run(self):
 
286
        trace.mutter('SocketListener %r has started', self)
286
287
        while True:
287
288
            readable, writable_unused, exception_unused = \
288
289
                select.select([self._socket], [], [], 0.1)
289
290
            if self._stop_event.isSet():
 
291
                trace.mutter('SocketListener %r has stopped', self)
290
292
                return
291
293
            if len(readable) == 0:
292
294
                continue
293
295
            try:
294
296
                s, addr_unused = self._socket.accept()
 
297
                trace.mutter('SocketListener %r has accepted connection %r',
 
298
                    self, s)
295
299
                # because the loopback socket is inline, and transports are
296
300
                # never explicitly closed, best to launch a new thread.
297
301
                threading.Thread(target=self._callback, args=(s,)).start()