You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by tz...@apache.org on 2020/03/26 08:13:04 UTC

[flink-statefun] 01/02: [hotfix] [testutil] Fix Javadocs in statefun-testutil

This is an automated email from the ASF dual-hosted git repository.

tzulitai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink-statefun.git

commit 339cc39579563b74ba6bf1f78c5ef9ba1f394cd3
Author: Tzu-Li (Gordon) Tai <tz...@apache.org>
AuthorDate: Thu Mar 26 15:35:56 2020 +0800

    [hotfix] [testutil] Fix Javadocs in statefun-testutil
---
 .../statefun/testutils/function/FunctionTestHarness.java |  2 ++
 .../testutils/matchers/StatefulFunctionMatchers.java     | 16 ++++++++++++----
 2 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/statefun-testutil/src/main/java/org/apache/flink/statefun/testutils/function/FunctionTestHarness.java b/statefun-testutil/src/main/java/org/apache/flink/statefun/testutils/function/FunctionTestHarness.java
index 9c1fedf..202f03d 100644
--- a/statefun-testutil/src/main/java/org/apache/flink/statefun/testutils/function/FunctionTestHarness.java
+++ b/statefun-testutil/src/main/java/org/apache/flink/statefun/testutils/function/FunctionTestHarness.java
@@ -120,6 +120,7 @@ public class FunctionTestHarness {
   /**
    * Advances the internal clock the harness and fires and pending timers.
    *
+   * @param duration the amount of time to advance for this tick.
    * @return A responses sent from the function after invocation.
    */
   public Map<Address, List<Object>> tick(Duration duration) {
@@ -129,6 +130,7 @@ public class FunctionTestHarness {
 
   /**
    * @param identifier An egress identifier
+   * @param <T> the data type consumed by the egress.
    * @return All the messages sent to that egress.
    */
   public <T> List<T> getEgress(EgressIdentifier<T> identifier) {
diff --git a/statefun-testutil/src/main/java/org/apache/flink/statefun/testutils/matchers/StatefulFunctionMatchers.java b/statefun-testutil/src/main/java/org/apache/flink/statefun/testutils/matchers/StatefulFunctionMatchers.java
index 5cf1644..f96b174 100644
--- a/statefun-testutil/src/main/java/org/apache/flink/statefun/testutils/matchers/StatefulFunctionMatchers.java
+++ b/statefun-testutil/src/main/java/org/apache/flink/statefun/testutils/matchers/StatefulFunctionMatchers.java
@@ -24,13 +24,13 @@ import java.util.List;
 import java.util.Map;
 import org.apache.flink.statefun.sdk.Address;
 import org.apache.flink.statefun.sdk.FunctionType;
+import org.apache.flink.statefun.testutils.function.FunctionTestHarness;
 import org.hamcrest.Matcher;
 
 /**
- * A set of Hamcrest matchers to help check the responses from a {@link
- * org.apache.flink.statefun.testutils.function.FunctionTestHarness}
+ * A set of Hamcrest matchers to help check the responses from a {@link FunctionTestHarness}
  *
- * <p>{@see FunctionTestHarness} for usage details.
+ * @see FunctionTestHarness for usage details.
  */
 public final class StatefulFunctionMatchers {
 
@@ -52,6 +52,10 @@ public final class StatefulFunctionMatchers {
    *
    * <p><b>Important:</b> This matcher expects an exact match on the number of responses sent to
    * this function.
+   *
+   * @param matcher matcher for address.
+   * @param matchers matchers for addresses.
+   * @return a matcher that checks all the responses sent to a given {@link FunctionType}.
    */
   public static MessagesSentToAddress sent(
       MatchersByAddress matcher, MatchersByAddress... matchers) {
@@ -65,7 +69,11 @@ public final class StatefulFunctionMatchers {
     return new MessagesSentToAddress(messagesByAddress);
   }
 
-  /** A matcher that checks the function did not send any messages. */
+  /**
+   * A matcher that checks the function did not send any messages.
+   *
+   * @return a matcher that checks the function did not send any messages.
+   */
   public static SentNothingMatcher sentNothing() {
     return new SentNothingMatcher();
   }