pandaapo commented on code in PR #4484:
URL: https://github.com/apache/eventmesh/pull/4484#discussion_r1359066032


##########
eventmesh-sdks/eventmesh-sdk-java/src/test/java/org/apache/eventmesh/client/grpc/producer/EventMeshGrpcProducerTest.java:
##########
@@ -93,11 +94,7 @@ public void setUp() throws Exception {
 
     @Test
     public void testPublishWithException() {
-        try {
-            
producer.publish(defaultEventMeshMessageBuilder().content("mockExceptionContent").build());
-        } catch (Exception e) {
-            assertThat(e).isNotNull();
-        }
+        Assertions.assertDoesNotThrow(() -> 
producer.publish(defaultEventMeshMessageBuilder().content("mockExceptionContent").build()));

Review Comment:
   This should be the original author's problem: she or he seems to want to 
test throwing an exception, but in fact, the exception was not thrown.
   
   You can change the method name to 'testPublishWithoutException()' and add 
the comment 'TODO: testPublishWithException()', or fix this issue according to 
the original author's intention.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to