wangzzu commented on code in PR #23242:
URL: https://github.com/apache/flink/pull/23242#discussion_r1301142809


##########
flink-runtime/src/test/java/org/apache/flink/runtime/rest/RestClientTest.java:
##########
@@ -82,42 +79,39 @@ void testConnectionTimeout() throws Exception {
                             new TestMessageHeaders(),
                             EmptyMessageParameters.getInstance(),
                             EmptyRequestBody.getInstance());
-
-            FlinkAssertions.assertThatFuture(future)
+            assertThatFuture(future)
                     .eventuallyFailsWith(ExecutionException.class)
                     .withCauseInstanceOf(ConnectTimeoutException.class)
-                    .extracting(Throwable::getCause, 
as(InstanceOfAssertFactories.THROWABLE))
-                    .hasMessageContaining(unroutableIp);
+                    .withMessageContaining(unroutableIp);
         }
     }
 
     @Test
-    public void testInvalidVersionRejection() throws Exception {
-        try (final RestClient restClient =
-                new RestClient(new Configuration(), 
Executors.directExecutor())) {
-            assertThatThrownBy(
-                            () ->
-                                    restClient.sendRequest(
-                                            unroutableIp,
-                                            80,
-                                            new TestMessageHeaders(),
-                                            
EmptyMessageParameters.getInstance(),
-                                            EmptyRequestBody.getInstance(),
-                                            Collections.emptyList(),
-                                            RuntimeRestAPIVersion.V0))
-                    .as("The request should have been rejected due to a 
version mismatch.")
-                    .isInstanceOf(IllegalArgumentException.class);
-        }
+    void testInvalidVersionRejection() throws Exception {
+        final RestClient restClient =
+                new RestClient(new Configuration(), 
Executors.directExecutor());

Review Comment:
   fixed



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