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


##########
flink-queryable-state/flink-queryable-state-runtime/src/test/java/org/apache/flink/queryablestate/network/ClientTest.java:
##########
@@ -721,29 +690,29 @@ 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(throwable.getCause().getCause())
+                            .isInstanceOfAny(
+                                    ClosedChannelException.class, 
IllegalStateException.class);

Review Comment:
   I think it makes sense. 
   
   Fixed it with a **fixup** commit.



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