~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_smart_transport.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-10-25 10:05:09 UTC
  • mfrom: (2941.1.1 ianc-integration)
  • Revision ID: pqm@pqm.ubuntu.com-20071025100509-veed3zxqsmgwdug1
clean error msg on bzr+ssh connection closing (#115601) (Ian Clatworthy)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1424
1424
        self.assertOffsetSerialisation([(1,2), (3,4), (100, 200)],
1425
1425
            '1,2\n3,4\n100,200', self.client_protocol)
1426
1426
 
 
1427
    def test_connection_closed_reporting(self):
 
1428
        input = StringIO()
 
1429
        output = StringIO()
 
1430
        client_medium = medium.SmartSimplePipesClientMedium(input, output)
 
1431
        request = client_medium.get_request()
 
1432
        smart_protocol = protocol.SmartClientRequestProtocolOne(request)
 
1433
        smart_protocol.call('hello')
 
1434
        ex = self.assertRaises(errors.ConnectionReset, 
 
1435
            smart_protocol.read_response_tuple)
 
1436
        self.assertEqual("Connection closed: "
 
1437
            "please check connectivity and permissions "
 
1438
            "(and try -Dhpss if further diagnosis is required)", str(ex))
 
1439
 
1427
1440
    def test_accept_bytes_of_bad_request_to_protocol(self):
1428
1441
        out_stream = StringIO()
1429
1442
        smart_protocol = protocol.SmartServerRequestProtocolOne(