~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

(jelmer) Check number of connections opened during various blackbox tests.
 (Jelmer Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
    script,
39
39
    test_foreign,
40
40
    )
 
41
from bzrlib.tests.matchers import ContainsNoVfsCalls
41
42
from bzrlib.transport import memory
42
43
 
43
44
 
267
268
        # become necessary for this use case. Please do not adjust this number
268
269
        # upwards without agreement from bzr's network support maintainers.
269
270
        self.assertLength(9, self.hpss_calls)
 
271
        self.assertLength(1, self.hpss_connections)
 
272
        self.assertThat(self.hpss_calls, ContainsNoVfsCalls)
270
273
 
271
274
    def test_push_smart_stacked_streaming_acceptance(self):
272
275
        self.setup_smart_server_with_call_log()
283
286
        # become necessary for this use case. Please do not adjust this number
284
287
        # upwards without agreement from bzr's network support maintainers.
285
288
        self.assertLength(14, self.hpss_calls)
 
289
        self.assertLength(1, self.hpss_connections)
 
290
        self.assertThat(self.hpss_calls, ContainsNoVfsCalls)
286
291
        remote = branch.Branch.open('public')
287
292
        self.assertEndsWith(remote.get_stacked_on_url(), '/parent')
288
293
 
299
304
        # become necessary for this use case. Please do not adjust this number
300
305
        # upwards without agreement from bzr's network support maintainers.
301
306
        self.assertLength(11, self.hpss_calls)
 
307
        self.assertLength(1, self.hpss_connections)
 
308
        self.assertThat(self.hpss_calls, ContainsNoVfsCalls)
302
309
 
303
310
    def test_push_smart_incremental_acceptance(self):
304
311
        self.setup_smart_server_with_call_log()
315
322
        # become necessary for this use case. Please do not adjust this number
316
323
        # upwards without agreement from bzr's network support maintainers.
317
324
        self.assertLength(11, self.hpss_calls)
 
325
        self.assertLength(1, self.hpss_connections)
 
326
        self.assertThat(self.hpss_calls, ContainsNoVfsCalls)
318
327
 
319
328
    def test_push_smart_with_default_stacking_url_path_segment(self):
320
329
        # If the default stacked-on location is a path element then branches