~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_pack_repository.py

  • Committer: Robert Collins
  • Date: 2010-04-08 04:34:03 UTC
  • mfrom: (5138 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5139.
  • Revision ID: robertc@robertcollins.net-20100408043403-56z0d07vdqrx7f3t
Update bugfix for 528114 to trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
from bzrlib.repofmt.groupcompress_repo import RepositoryFormat2a
46
46
from bzrlib.smart import (
47
47
    client,
48
 
    server,
49
48
    )
50
49
from bzrlib.tests import (
51
50
    TestCase,
54
53
    TestSkipped,
55
54
    )
56
55
from bzrlib.transport import (
57
 
    fakenfs,
 
56
    get_transport,
58
57
    memory,
59
 
    get_transport,
60
58
    )
 
59
from bzrlib.tests import test_server
61
60
from bzrlib.tests.per_repository import TestCaseWithRepository
62
61
 
63
62
 
240
239
 
241
240
    def test_commit_write_group_returns_new_pack_names(self):
242
241
        # This test doesn't need real disk.
243
 
        self.vfs_transport_factory = tests.MemoryServer
 
242
        self.vfs_transport_factory = memory.MemoryServer
244
243
        format = self.get_format()
245
244
        repo = self.make_repository('foo', format=format)
246
245
        repo.lock_write()
277
276
    def test_fail_obsolete_deletion(self):
278
277
        # failing to delete obsolete packs is not fatal
279
278
        format = self.get_format()
280
 
        server = fakenfs.FakeNFSServer()
 
279
        server = test_server.FakeNFSServer()
281
280
        self.start_server(server)
282
281
        transport = get_transport(server.get_url())
283
282
        bzrdir = self.get_format().initialize_on_transport(transport)
590
589
    def prepare_for_break_lock(self):
591
590
        # Setup the global ui factory state so that a break-lock method call
592
591
        # will find usable input in the input stream.
593
 
        old_factory = ui.ui_factory
594
 
        def restoreFactory():
595
 
            ui.ui_factory = old_factory
596
 
        self.addCleanup(restoreFactory)
597
592
        ui.ui_factory = ui.CannedInputUIFactory([True])
598
593
 
599
594
    def test_break_lock_breaks_physical_lock(self):
1072
1067
        super(TestSmartServerAutopack, self).setUp()
1073
1068
        # Create a smart server that publishes whatever the backing VFS server
1074
1069
        # does.
1075
 
        self.smart_server = server.SmartTCPServer_for_testing()
 
1070
        self.smart_server = test_server.SmartTCPServer_for_testing()
1076
1071
        self.start_server(self.smart_server, self.get_server())
1077
1072
        # Log all HPSS calls into self.hpss_calls.
1078
1073
        client._SmartClient.hooks.install_named_hook(