Rev 4065: (robertc) Add a ratchet for branch hpss operations. (Robert Collins, in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Sun Mar 1 22:24:15 GMT 2009


At file:///home/pqm/archives/thelove/bzr/%2Btrunk/

------------------------------------------------------------
revno: 4065
revision-id: pqm at pqm.ubuntu.com-20090301222412-o2s34646lnn958f3
parent: pqm at pqm.ubuntu.com-20090301121857-3lxdqurjbln7ybd2
parent: robertc at robertcollins.net-20090227031843-3isdgsb73jiqgdwg
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Sun 2009-03-01 22:24:12 +0000
message:
  (robertc) Add a ratchet for branch hpss operations. (Robert Collins,
  	Andrew Bennetts)
modified:
  bzrlib/tests/blackbox/test_branch.py test_branch.py-20060524161337-noms9gmcwqqrfi8y-1
    ------------------------------------------------------------
    revno: 4060.1.1
    revision-id: robertc at robertcollins.net-20090227031843-3isdgsb73jiqgdwg
    parent: pqm at pqm.ubuntu.com-20090227024410-cvgq2458iyz9a2nl
    committer: Robert Collins <robertc at robertcollins.net>
    branch nick: branch.roundtrips
    timestamp: Fri 2009-02-27 14:18:43 +1100
    message:
      Add ratcheted acceptance test for branching from a smart server.
    modified:
      bzrlib/tests/blackbox/test_branch.py test_branch.py-20060524161337-noms9gmcwqqrfi8y-1
=== modified file 'bzrlib/tests/blackbox/test_branch.py'
--- a/bzrlib/tests/blackbox/test_branch.py	2009-02-07 15:12:35 +0000
+++ b/bzrlib/tests/blackbox/test_branch.py	2009-02-27 03:18:43 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2005, 2006, 2008 Canonical Ltd
+# Copyright (C) 2005, 2006, 2008, 2009 Canonical Ltd
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -257,6 +257,23 @@
             err)
 
 
+class TestSmartServerBranching(ExternalBase):
+
+    def test_branch_from_trivial_branch_streaming_acceptance(self):
+        self.setup_smart_server_with_call_log()
+        t = self.make_branch_and_tree('from')
+        for count in range(9):
+            t.commit(message='commit %d' % count)
+        self.reset_smart_call_log()
+        self.run_bzr(['branch', self.get_url('from'), 'local-target'])
+        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(68, rpc_count)
+
 
 class TestRemoteBranch(TestCaseWithSFTPServer):
 




More information about the bazaar-commits mailing list