Rev 4014: (robertc) Add hpss push tests with hpss call ratchets to prevent in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Wed Feb 18 05:19:03 GMT 2009
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 4014
revision-id: pqm at pqm.ubuntu.com-20090218051900-z4u214yqxrm7uvtl
parent: pqm at pqm.ubuntu.com-20090218044142-j5oegz3puzoi82m1
parent: robertc at robertcollins.net-20090218042104-pf0hqv2bje74rvd1
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Wed 2009-02-18 05:19:00 +0000
message:
(robertc) Add hpss push tests with hpss call ratchets to prevent
regressions, (Andrew Bennetts, Robert Collins)
modified:
bzrlib/tests/blackbox/test_push.py test_push.py-20060329002750-929af230d5d22663
------------------------------------------------------------
revno: 4011.2.4
revision-id: robertc at robertcollins.net-20090218042104-pf0hqv2bje74rvd1
parent: robertc at robertcollins.net-20090218041442-k28bhmqhwko728u5
committer: Robert Collins <robertc at robertcollins.net>
branch nick: push.roundtrips
timestamp: Wed 2009-02-18 15:21:04 +1100
message:
Make the ratchet aspect of the blackbox smart server push acceptance tests clearer.
modified:
bzrlib/tests/blackbox/test_push.py test_push.py-20060329002750-929af230d5d22663
------------------------------------------------------------
revno: 4011.2.3
revision-id: robertc at robertcollins.net-20090218041442-k28bhmqhwko728u5
parent: robertc at robertcollins.net-20090218041128-nfgtpku9628f0h5x
committer: Robert Collins <robertc at robertcollins.net>
branch nick: push.roundtrips
timestamp: Wed 2009-02-18 15:14:42 +1100
message:
Adjust push acceptance/effort tests for correctness improvements in bzrlib which raised the figure.
modified:
bzrlib/tests/blackbox/test_push.py test_push.py-20060329002750-929af230d5d22663
------------------------------------------------------------
revno: 4011.2.2
revision-id: robertc at robertcollins.net-20090218041128-nfgtpku9628f0h5x
parent: robertc at robertcollins.net-20090218000242-8lj7ewn31dmwh5q3
parent: pqm at pqm.ubuntu.com-20090218040347-uw2nm8ix8udwditt
committer: Robert Collins <robertc at robertcollins.net>
branch nick: push.roundtrips
timestamp: Wed 2009-02-18 15:11:28 +1100
message:
Merge bzr.dev for the use-RemoteObjects when initial pushing.
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/branch.py branch.py-20050309040759-e4baf4e0d046576e
bzrlib/bzrdir.py bzrdir.py-20060131065624-156dfea39c4387cb
bzrlib/remote.py remote.py-20060720103555-yeeg2x51vn0rbtdp-1
bzrlib/smart/branch.py branch.py-20061124031907-mzh3pla28r83r97f-1
bzrlib/tests/branch_implementations/test_branch.py testbranch.py-20050711070244-121d632bc37d7253
bzrlib/tests/branch_implementations/test_hooks.py test_hooks.py-20070129154855-blhpwxmvjs07waei-1
bzrlib/tests/branch_implementations/test_sprout.py test_sprout.py-20070521151739-b8t8p7axw1h966ws-1
bzrlib/tests/bzrdir_implementations/test_bzrdir.py test_bzrdir.py-20060131065642-0ebeca5e30e30866
bzrlib/tests/per_repository/test_add_fallback_repository.py test_add_fallback_re-20080215040003-8w9n4ck9uqdxj18m-1
bzrlib/tests/per_repository/test_repository.py test_repository.py-20060131092128-ad07f494f5c9d26c
bzrlib/tests/test_remote.py test_remote.py-20060720103555-yeeg2x51vn0rbtdp-2
------------------------------------------------------------
revno: 4011.2.1
revision-id: robertc at robertcollins.net-20090218000242-8lj7ewn31dmwh5q3
parent: pqm at pqm.ubuntu.com-20090216172448-vj35mjoe463c3bk2
committer: Robert Collins <robertc at robertcollins.net>
branch nick: push.roundtrips
timestamp: Wed 2009-02-18 11:02:42 +1100
message:
Add ratchet style blackbox effort tests for push over bzr+ssh. (Andrew Bennetts, Robert Collins)
modified:
bzrlib/tests/blackbox/test_push.py test_push.py-20060329002750-929af230d5d22663
=== modified file 'bzrlib/tests/blackbox/test_push.py'
--- a/bzrlib/tests/blackbox/test_push.py 2009-01-02 01:58:48 +0000
+++ b/bzrlib/tests/blackbox/test_push.py 2009-02-18 04:21:04 +0000
@@ -29,6 +29,7 @@
from bzrlib.bzrdir import BzrDirMetaFormat1
from bzrlib.osutils import abspath
from bzrlib.repofmt.knitrepo import RepositoryFormatKnit1
+from bzrlib.smart import client, server
from bzrlib.tests.blackbox import ExternalBase
from bzrlib.tests.http_server import HttpServer
from bzrlib.transport.memory import MemoryServer, MemoryTransport
@@ -179,6 +180,50 @@
% tuple(map(urlutils.local_path_to_url, ['from', 'to-two'])))
self.failUnlessExists('to-two')
+ def _reset_smart_call_log(self):
+ self.hpss_calls = []
+
+ def _setup_smart_call_log(self):
+ self.transport_server = server.SmartTCPServer_for_testing
+ self.hpss_calls = []
+ def capture_hpss_call(params):
+ self.hpss_calls.append(params)
+ client._SmartClient.hooks.install_named_hook(
+ 'call', capture_hpss_call, None)
+
+ def test_push_smart_non_stacked_streaming_acceptance(self):
+ self._setup_smart_call_log()
+ t = self.make_branch_and_tree('from')
+ t.commit(allow_pointless=True, message='first commit')
+ self._reset_smart_call_log()
+ self.run_bzr(['push', self.get_url('to-one')], working_dir='from')
+ rpc_count = len(self.hpss_calls)
+ # This figure represent the amount of work to perform this use case. It
+ # is entirely ok to reduce this number if a test fails due to rpc_count
+ # being too low. If rpc_count increases, more network roundtrips have
+ # become necessary for this use case. Please do not adjust this number
+ # upwards without agreement from bzr's network support maintainers.
+ self.assertEqual(107, rpc_count)
+
+ def test_push_smart_stacked_streaming_acceptance(self):
+ self._setup_smart_call_log()
+ parent = self.make_branch_and_tree('parent', format='1.9')
+ parent.commit(message='first commit')
+ local = parent.bzrdir.sprout('local').open_workingtree()
+ local.commit(message='local commit')
+ self._reset_smart_call_log()
+ self.run_bzr(['push', '--stacked', '--stacked-on', '../parent',
+ self.get_url('public')], working_dir='local')
+ rpc_count = len(self.hpss_calls)
+ # This figure represent the amount of work to perform this use case. It
+ # is entirely ok to reduce this number if a test fails due to rpc_count
+ # being too low. If rpc_count increases, more network roundtrips have
+ # become necessary for this use case. Please do not adjust this number
+ # upwards without agreement from bzr's network support maintainers.
+ self.assertEqual(132, rpc_count)
+ remote = Branch.open('public')
+ self.assertEndsWith(remote.get_stacked_on_url(), '/parent')
+
def create_simple_tree(self):
tree = self.make_branch_and_tree('tree')
self.build_tree(['tree/a'])
More information about the bazaar-commits
mailing list