BewareMyPower commented on code in PR #290:
URL: 
https://github.com/apache/pulsar-client-python/pull/290#discussion_r2752315037


##########
tests/asyncio_test.py:
##########
@@ -164,6 +164,18 @@ async def test_producer_is_connected(self):
         await producer.close()
         self.assertFalse(producer.is_connected())
 
+    async def test_shutdown_client(self):
+        producer = await 
self._client.create_producer("persistent://public/default/partitioned_topic_name_test")
+        await producer.send(b"hello")
+        self._client.shutdown()
+
+        try:
+            await producer.send(b"hello")
+            self.assertTrue(False)
+        except PulsarException:

Review Comment:
   Should this be a more specific exception like `PulsarException.xxx`?



##########
tests/asyncio_test.py:
##########
@@ -164,6 +164,18 @@ async def test_producer_is_connected(self):
         await producer.close()
         self.assertFalse(producer.is_connected())
 
+    async def test_shutdown_client(self):
+        producer = await 
self._client.create_producer("persistent://public/default/partitioned_topic_name_test")
+        await producer.send(b"hello")
+        self._client.shutdown()
+
+        try:
+            await producer.send(b"hello")
+            self.assertTrue(False)

Review Comment:
   It's better to use `self.fail` here.



-- 
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]

Reply via email to