~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_selftest.py

  • Committer: Robert Collins
  • Date: 2007-03-25 08:59:56 UTC
  • mto: (2376.3.1 integration)
  • mto: This revision was merged to the branch mainline in revision 2401.
  • Revision ID: robertc@robertcollins.net-20070325085956-my8jv7cifqzyltyz
New SmartServer hooks facility. There are two initial hooks documented
in bzrlib.transport.smart.SmartServerHooks. The two initial hooks allow
plugins to execute code upon server startup and shutdown.
(Robert Collins).

SmartServer in standalone mode will now close its listening socket
when it stops, rather than waiting for garbage collection. This primarily
fixes test suite hangs when a test tries to connect to a shutdown server.
It may also help improve behaviour when dealing with a server running
on a specific port (rather than dynamically assigned ports).
(Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
903
903
        """The bzrlib hooks should be sanitised by setUp."""
904
904
        self.assertEqual(bzrlib.branch.BranchHooks(),
905
905
            bzrlib.branch.Branch.hooks)
 
906
        self.assertEqual(bzrlib.transport.smart.SmartServerHooks(),
 
907
            bzrlib.transport.smart.SmartTCPServer.hooks)
906
908
 
907
909
    def test__gather_lsprof_in_benchmarks(self):
908
910
        """When _gather_lsprof_in_benchmarks is on, accumulate profile data.