Rev 4030: Fix test_call_with_body_stream_error which was broken by a debugging change to still pass tests. in http://people.ubuntu.com/~robertc/baz2.0/integration

Robert Collins robertc at robertcollins.net
Fri Feb 20 22:10:51 GMT 2009


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

------------------------------------------------------------
revno: 4030
revision-id: robertc at robertcollins.net-20090220221045-bmuh2t0wf09szn3z
parent: robertc at robertcollins.net-20090220104851-m0s7qwe6jzqkgj1f
committer: Robert Collins <robertc at robertcollins.net>
branch nick: integration
timestamp: Sat 2009-02-21 09:10:45 +1100
message:
  Fix test_call_with_body_stream_error which was broken by a debugging change to still pass tests.
=== modified file 'bzrlib/smart/protocol.py'
--- a/bzrlib/smart/protocol.py	2009-02-20 08:26:50 +0000
+++ b/bzrlib/smart/protocol.py	2009-02-20 22:10:45 +0000
@@ -1253,6 +1253,8 @@
             # Currently the client unconditionally sends ('error',) as the
             # error args.
             self._write_structure(('error',))
+            self._write_end()
+            self._medium_request.finished_writing()
             raise exc_info[0], exc_info[1], exc_info[2]
         self._write_end()
         self._medium_request.finished_writing()

=== modified file 'bzrlib/tests/test_smart_transport.py'
--- a/bzrlib/tests/test_smart_transport.py	2009-02-11 09:45:27 +0000
+++ b/bzrlib/tests/test_smart_transport.py	2009-02-20 22:10:45 +0000
@@ -2766,7 +2766,8 @@
             yield 'aaa'
             yield 'bbb'
             raise Exception('Boom!')
-        requester.call_with_body_stream(('one arg',), stream_that_fails())
+        self.assertRaises(Exception, requester.call_with_body_stream,
+            ('one arg',), stream_that_fails())
         self.assertEquals(
             'bzr message 3 (bzr 1.6)\n' # protocol version
             '\x00\x00\x00\x02de' # headers




More information about the bazaar-commits mailing list