TanYuxin-tyx commented on code in PR #22471:
URL: https://github.com/apache/flink/pull/22471#discussion_r1174848926


##########
flink-queryable-state/flink-queryable-state-runtime/src/test/java/org/apache/flink/queryablestate/network/ClientTest.java:
##########
@@ -721,29 +740,34 @@ public void testClientServerIntegration() throws 
Throwable {
             } catch (Exception e) {
                 e.printStackTrace();
             }
-            Assert.assertTrue(client.isEventGroupShutdown());
-
-            final CombinableMatcher<Throwable> exceptionMatcher =
-                    
either(FlinkMatchers.containsCause(ClosedChannelException.class))
-                            
.or(FlinkMatchers.containsCause(IllegalStateException.class));
+            assertThat(client.isEventGroupShutdown()).isTrue();
 
             for (Future<Void> future : taskFutures) {
                 try {
                     future.get();
-                    fail("Did not throw expected Exception after shut down");
-                } catch (ExecutionException t) {
-                    assertThat(t, exceptionMatcher);
+                } catch (Throwable throwable) {
+                    assertThat(
+                                    ExceptionUtils.findThrowable(
+                                                            throwable, 
ClosedChannelException.class)
+                                                    .isPresent()
+                                            || ExceptionUtils.findThrowable(
+                                                            throwable, 
IllegalStateException.class)
+                                                    .isPresent())
+                            .isTrue();

Review Comment:
   I have used `assertThat` instead.



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