XComp commented on code in PR #19443:
URL: https://github.com/apache/flink/pull/19443#discussion_r849514904


##########
flink-runtime/src/test/java/org/apache/flink/runtime/rest/RestServerEndpointITCase.java:
##########
@@ -703,6 +707,22 @@ public void testDuplicateHandlerRegistrationIsForbidden() 
throws Exception {
                 });
     }
 
+    @Test
+    public void testOnUnavailableRpcEndpointReturns503()
+            throws IOException, ExecutionException, InterruptedException {
+        CompletableFuture<EmptyResponseBody> response =
+                restClient.sendRequest(
+                        serverAddress.getHostName(),
+                        serverAddress.getPort(),
+                        TestUnavailableHeaders.INSTANCE);
+
+        assertThatThrownBy(() -> response.get())

Review Comment:
   ```suggestion
           assertThatThrownBy(response::get)
   ```



##########
flink-runtime/src/test/java/org/apache/flink/runtime/rest/handler/AbstractHandlerTest.java:
##########
@@ -67,16 +67,16 @@
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.atomic.AtomicReference;
 
+import static org.assertj.core.api.AssertionsForClassTypes.assertThat;
 import static org.junit.Assert.assertThat;
 import static org.junit.Assert.fail;
 import static org.mockito.Matchers.any;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
 
 /** Tests for {@link AbstractHandler}. */
-public class AbstractHandlerTest extends TestLogger {
-
-    @Rule public final TemporaryFolder temporaryFolder = new TemporaryFolder();
+@ExtendWith({TestLoggerExtension.class})

Review Comment:
   ```suggestion
   @ExtendWith(TestLoggerExtension.class)
   ```
   nit: the curly brackets are obsolete.



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