kojiromike commented on code in PR #2319:
URL: https://github.com/apache/avro/pull/2319#discussion_r1267105398
##########
lang/py/avro/test/test_ipc.py:
##########
@@ -38,6 +40,12 @@ def test_server_with_path(self):
client_with_default_path = avro.ipc.HTTPTransceiver("apache.org", 80)
self.assertEqual("/", client_with_default_path.req_resource)
+ def test_empty_reader(self):
+ response_reader = avro.ipc.FramedReader(io.BytesIO(b"Bad Response"))
+ with self.assertRaises(avro.errors.ConnectionClosedException) as cm:
+ response_reader.read_framed_message()
+ assert str(cm.exception) == "Reader read 0 bytes."
Review Comment:
I think checking the exact message is unnecessary. Testing for the expected
exception type should be sufficient.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]