zentol commented on code in PR #19560:
URL: https://github.com/apache/flink/pull/19560#discussion_r858384925


##########
flink-kubernetes/src/test/java/org/apache/flink/kubernetes/highavailability/KubernetesStateHandleStoreTest.java:
##########
@@ -399,31 +406,38 @@ public void 
testReplaceWithDeletingKeyWithFailingDiscard() throws Exception {
                             final TestingLongStateHandleHelper.LongStateHandle 
newState =
                                     new 
TestingLongStateHandleHelper.LongStateHandle(23456L);
 
-                            assertThat(store.exists(key), 
is(StringResourceVersion.notExisting()));
-                            final StateHandleStore.NotExistException exception 
=
-                                    assertThrows(
-                                            
StateHandleStore.NotExistException.class,
+                            assertThat(store.exists(key))
+                                    
.isEqualByComparingTo(StringResourceVersion.notExisting());
+                            StateHandleStore.NotExistException exception =
+                                    catchThrowableOfType(

Review Comment:
   use `satisfies()` and pass a consumer that makes the instanceof check.
   ```
   assertThatThrownBy(...)
      .satisfies(ex -> assertThat(ex.isInstangeOf(...)))
   ```



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