~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/ftp_server/pyftpdlib_based.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-08-21 17:09:54 UTC
  • mfrom: (5385.1.1 trivial-NEWS-fileencoding)
  • Revision ID: pqm@pqm.ubuntu.com-20100821170954-efrj80bvw56s5mzc
(parthm) Remove 'encoding' option from NEWS modeline as its an error in Vim
 7.3+ (Parth Malwankar)

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
 
29
29
from bzrlib import (
30
30
    osutils,
31
 
    tests,
32
31
    trace,
33
32
    )
34
33
from bzrlib.tests import test_server
184
183
        self._ftpd_starting.acquire() # So it can be released by the server
185
184
        self._ftpd_thread = threading.Thread(target=self._run_server,)
186
185
        self._ftpd_thread.start()
187
 
        if 'threads' in tests.selftest_debug_flags:
188
 
            sys.stderr.write('Thread started: %s\n'
189
 
                             % (self._ftpd_thread.ident,))
190
186
        # Wait for the server thread to start (i.e release the lock)
191
187
        self._ftpd_starting.acquire()
192
188
        self._ftpd_starting.release()
199
195
        self._ftp_server.close()
200
196
        self._ftpd_running = False
201
197
        self._ftpd_thread.join()
202
 
        if 'threads' in tests.selftest_debug_flags:
203
 
            sys.stderr.write('Thread  joined: %s\n'
204
 
                             % (self._ftpd_thread.ident,))
205
198
 
206
199
    def _run_server(self):
207
200
        """Run the server until stop_server is called, shut it down properly then.