1996fanrui commented on code in PR #2243:
URL:
https://github.com/apache/incubator-streampark/pull/2243#discussion_r1064282729
##########
streampark-console/streampark-console-service/src/test/java/org/apache/org/apache/streampark/common/util/CompletableFutureUtilsTest.java:
##########
@@ -143,4 +147,64 @@ private String runStart(int sec) {
}
return "start successful";
}
+
+ @Test
+ public void thenSupplyNormally() throws Exception {
+ String resp =
+ CompletableFutureUtils.supplyTimeout(
+ CompletableFuture.supplyAsync(() -> "success"),
+ 3,
+ TimeUnit.SECONDS,
+ success -> success,
+ e -> "error")
+ .thenApply(r -> r)
+ .get();
+ System.out.println(resp);
Review Comment:
All tests should check some conditions instead of `System.out.println`
--
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]