~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_serve.py

  • Committer: Vincent Ladeuil
  • Date: 2009-09-08 03:31:31 UTC
  • mto: (4678.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 4679.
  • Revision ID: v.ladeuil+lp@free.fr-20090908033131-429xxv4ekhp7jr18
Force IPV4 to fix failure on IPV6-enabled hosts.

* bzrlib/tests/blackbox/test_serve.py:
(TestCmdServeChrooting.test_serve_tcp): Force IPv4.

Show diffs side-by-side

added added

removed removed

Lines of Context:
255
255
        t = self.get_transport()
256
256
        t.mkdir('server-root')
257
257
        self.run_bzr_serve_then_func(
258
 
            ['--port', '0', '--directory', t.local_abspath('server-root'),
 
258
            ['--port', '127.0.0.1:0',
 
259
             '--directory', t.local_abspath('server-root'),
259
260
             '--allow-writes'],
260
261
            self.when_server_started)
261
262
        # The when_server_started method issued a find_repositoryV3 that should
262
263
        # fail with 'norepository' because there are no repositories inside the
263
264
        # --directory.
264
 
        if sys.platform.startswith('freebsd'):
265
 
            # Something fishy is going on there, the server is able to publish
266
 
            # the port it is listening too, yet the client can't connect...
267
 
            # The assertion below should fail when the problem is fixed or the
268
 
            # test rewritten.
269
 
            self.assertRaises(AttributeError, getattr, self, 'client_resp')
270
 
        else:
271
 
            self.assertEqual(('norepository',), self.client_resp)
 
265
        self.assertEqual(('norepository',), self.client_resp)
272
266
 
273
267
    def run_bzr_serve_then_func(self, serve_args, func, *func_args,
274
268
            **func_kwargs):