~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_pack_repository.py

  • Committer: Martin Pool
  • Date: 2010-02-25 06:17:27 UTC
  • mfrom: (5055 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5057.
  • Revision ID: mbp@sourcefrog.net-20100225061727-4sd9lt0qmdc6087t
merge news

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2008, 2009 Canonical Ltd
 
1
# Copyright (C) 2008, 2009, 2010 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
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)
1068
1067
        super(TestSmartServerAutopack, self).setUp()
1069
1068
        # Create a smart server that publishes whatever the backing VFS server
1070
1069
        # does.
1071
 
        self.smart_server = server.SmartTCPServer_for_testing()
 
1070
        self.smart_server = test_server.SmartTCPServer_for_testing()
1072
1071
        self.start_server(self.smart_server, self.get_server())
1073
1072
        # Log all HPSS calls into self.hpss_calls.
1074
1073
        client._SmartClient.hooks.install_named_hook(