Rev 4061: Add ratcheted acceptance test for branching from a smart server. in http://people.ubuntu.com/~robertc/baz2.0/branch.roundtrips

Robert Collins robertc at robertcollins.net
Fri Feb 27 03:18:52 GMT 2009


At http://people.ubuntu.com/~robertc/baz2.0/branch.roundtrips

------------------------------------------------------------
revno: 4061
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 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