~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_branch.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-03-06 06:48:25 UTC
  • mfrom: (4070.8.6 debug-config)
  • Revision ID: pqm@pqm.ubuntu.com-20090306064825-kbpwggw21dygeix6
(mbp) debug_flags configuration option

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
#
13
13
# You should have received a copy of the GNU General Public License
14
14
# along with this program; if not, write to the Free Software
15
 
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16
16
 
17
17
 
18
18
"""Black-box tests for bzr branch."""
267
267
        self.reset_smart_call_log()
268
268
        out, err = self.run_bzr(['branch', self.get_url('from'),
269
269
            self.get_url('target')])
 
270
        rpc_count = len(self.hpss_calls)
270
271
        # This figure represent the amount of work to perform this use case. It
271
272
        # is entirely ok to reduce this number if a test fails due to rpc_count
272
273
        # being too low. If rpc_count increases, more network roundtrips have
273
274
        # become necessary for this use case. Please do not adjust this number
274
275
        # upwards without agreement from bzr's network support maintainers.
275
 
        self.assertLength(53, self.hpss_calls)
 
276
        self.assertEqual(71, rpc_count)
276
277
 
277
278
    def test_branch_from_trivial_branch_streaming_acceptance(self):
278
279
        self.setup_smart_server_with_call_log()
282
283
        self.reset_smart_call_log()
283
284
        out, err = self.run_bzr(['branch', self.get_url('from'),
284
285
            'local-target'])
285
 
        # This figure represent the amount of work to perform this use case. It
286
 
        # is entirely ok to reduce this number if a test fails due to rpc_count
287
 
        # being too low. If rpc_count increases, more network roundtrips have
288
 
        # become necessary for this use case. Please do not adjust this number
289
 
        # upwards without agreement from bzr's network support maintainers.
290
 
        self.assertLength(10, self.hpss_calls)
291
 
 
292
 
    def test_branch_from_trivial_stacked_branch_streaming_acceptance(self):
293
 
        self.setup_smart_server_with_call_log()
294
 
        t = self.make_branch_and_tree('trunk')
295
 
        for count in range(8):
296
 
            t.commit(message='commit %d' % count)
297
 
        tree2 = t.branch.bzrdir.sprout('feature', stacked=True
298
 
            ).open_workingtree()
299
 
        tree2.commit('feature change')
300
 
        self.reset_smart_call_log()
301
 
        out, err = self.run_bzr(['branch', self.get_url('feature'),
302
 
            'local-target'])
303
 
        # This figure represent the amount of work to perform this use case. It
304
 
        # is entirely ok to reduce this number if a test fails due to rpc_count
305
 
        # being too low. If rpc_count increases, more network roundtrips have
306
 
        # become necessary for this use case. Please do not adjust this number
307
 
        # upwards without agreement from bzr's network support maintainers.
308
 
        self.assertLength(15, self.hpss_calls)
 
286
        rpc_count = len(self.hpss_calls)
 
287
        # This figure represent the amount of work to perform this use case. It
 
288
        # is entirely ok to reduce this number if a test fails due to rpc_count
 
289
        # being too low. If rpc_count increases, more network roundtrips have
 
290
        # become necessary for this use case. Please do not adjust this number
 
291
        # upwards without agreement from bzr's network support maintainers.
 
292
        self.assertEqual(17, rpc_count)
309
293
 
310
294
 
311
295
class TestRemoteBranch(TestCaseWithSFTPServer):