snuyanzin commented on code in PR #23976:
URL: https://github.com/apache/flink/pull/23976#discussion_r1433803072


##########
flink-streaming-java/src/test/java/org/apache/flink/streaming/api/operators/collect/CollectSinkFunctionTest.java:
##########
@@ -136,9 +135,8 @@ void testConfiguredPortIsUsed() throws Exception {
                     .getConfiguration()
                     .setInteger(TaskManagerOptions.COLLECT_PORT, 
socket.getLocalPort());
             assertThatThrownBy(() -> functionWrapper.openFunction())
-                    .satisfies(
-                            FlinkAssertions.anyCauseMatches(
-                                    BindException.class, "Address already in 
use (Bind failed)"));
+                    .isInstanceOf(BindException.class)
+                    .hasMessageContaining("Address already in use");

Review Comment:
   I wonder if there is any reason to go away from 
`FlinkAssertions.anyCauseMatches` ?
   IIRC `FlinkAssertions.anyCauseMatches` also checks for containing message, 
so probably the only thing which should be changed is `"Address already in use 
(Bind failed)"` replace with `"Address already in use"`
   
   Or did I miss anything?



-- 
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: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to