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


##########
flink-connectors/flink-connector-kafka/src/test/java/org/apache/flink/streaming/connectors/kafka/KafkaConsumerTestBase.java:
##########
@@ -192,7 +192,7 @@ public void runFailOnNoBrokerTest() throws Exception {
 
             final TimeoutException timeoutException = 
optionalTimeoutException.get();
             if (useNewSource) {
-                assertThat(timeoutException.getCause().getMessage())
+                assertThat(timeoutException.getMessage())
                         .contains("Timed out waiting for a node assignment.");

Review Comment:
   Probably `hasMessageContaining` could be used here like
   ```java
                   assertThat(timeoutException)
                           .hasMessageContaining("Timed out waiting for a node 
assignment.");
   ```



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