wangzzu commented on code in PR #23242: URL: https://github.com/apache/flink/pull/23242#discussion_r1300073633
########## flink-runtime/src/test/java/org/apache/flink/runtime/rest/RestExternalHandlersITCase.java: ########## @@ -128,29 +124,27 @@ void teardown() throws Exception { void testHandlersMustBeLoaded() { final List<InboundChannelHandlerFactory> inboundChannelHandlerFactories = serverEndpoint.getInboundChannelHandlerFactories(); - assertEquals(inboundChannelHandlerFactories.size(), 2); - assertTrue( - inboundChannelHandlerFactories.get(0) instanceof Prio1InboundChannelHandlerFactory); - assertTrue( - inboundChannelHandlerFactories.get(1) instanceof Prio0InboundChannelHandlerFactory); + assertThat(inboundChannelHandlerFactories.size()).isEqualTo(2); + assertThat(inboundChannelHandlerFactories.get(0)) + .isInstanceOf(Prio1InboundChannelHandlerFactory.class); + assertThat(inboundChannelHandlerFactories.get(1)) + .isInstanceOf(Prio0InboundChannelHandlerFactory.class); final List<OutboundChannelHandlerFactory> outboundChannelHandlerFactories = restClient.getOutboundChannelHandlerFactories(); - assertEquals(outboundChannelHandlerFactories.size(), 2); - assertTrue( - outboundChannelHandlerFactories.get(0) - instanceof Prio1OutboundChannelHandlerFactory); - assertTrue( - outboundChannelHandlerFactories.get(1) - instanceof Prio0OutboundChannelHandlerFactory); + assertThat(outboundChannelHandlerFactories.size()).isEqualTo(2); + assertThat(outboundChannelHandlerFactories.get(0)) + .isInstanceOf(Prio1OutboundChannelHandlerFactory.class); + assertThat(outboundChannelHandlerFactories.get(1)) + .isInstanceOf(Prio0OutboundChannelHandlerFactory.class); try { final CompletableFuture<TestResponse> response = sendRequestToTestHandler(new TestRequest()); response.get(); fail("Request must fail with 2 times redirected URL"); } catch (Exception e) { - assertTrue(e.getMessage().contains(REDIRECT2_URL)); + assertThat(e.getMessage()).contains(REDIRECT2_URL); } Review Comment: fixed it -- 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