You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "snuyanzin (via GitHub)" <gi...@apache.org> on 2023/03/10 09:24:16 UTC

[GitHub] [flink] snuyanzin commented on a diff in pull request #22140: [FLINK-31385] Introduce extended Assertj matchers for completable fut…

snuyanzin commented on code in PR #22140:
URL: https://github.com/apache/flink/pull/22140#discussion_r1132136726


##########
flink-test-utils-parent/flink-test-utils-junit/src/main/java/org/apache/flink/core/testutils/FlinkAssertions.java:
##########
@@ -139,4 +143,29 @@ public static Stream<Throwable> chainOfCauses(Throwable throwable) {
         }
         return Stream.concat(Stream.of(throwable), chainOfCauses(throwable.getCause()));
     }
+
+    /**
+     * Create assertion for {@link java.util.concurrent.CompletableFuture}.
+     *
+     * @param actual the actual value.
+     * @param <T> the type of the value contained in the {@link
+     *     java.util.concurrent.CompletableFuture}.
+     * @return the created assertion object.
+     */
+    public static <T> FlinkCompletableFutureAssert<T> assertThatFuture(
+            CompletableFuture<T> actual) {
+        return new FlinkCompletableFutureAssert<>(actual);
+    }
+
+    /**
+     * Create assertion for {@link java.util.concurrent.CompletableFuture}.
+     *
+     * @param actual the actual value.
+     * @param <T> the type of the value contained in the {@link
+     *     java.util.concurrent.CompletableFuture}.

Review Comment:
   shouldn't it be `CompletionStage` as well?
   ```suggestion
        *     java.util.concurrent.CompletionStage}.
   ```



-- 
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-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org