ptupitsyn commented on code in PR #3920:
URL: https://github.com/apache/ignite-3/pull/3920#discussion_r1642826742


##########
modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/client/ItThinClientComputeTest.java:
##########
@@ -737,39 +745,47 @@ private List<ClusterNode> sortedNodes() {
 
     private static class NodeNameJob implements ComputeJob<String> {
         @Override
-        public String execute(JobExecutionContext context, Object... args) {
-            return context.ignite().name() + 
Arrays.stream(args).map(Object::toString).collect(Collectors.joining("_"));
+        public CompletableFuture<String> executeAsync(JobExecutionContext 
context, Object... args) {
+            return completedFuture(
+                    context.ignite().name() + 
Arrays.stream(args).map(Object::toString).collect(Collectors.joining("_")));
         }
     }
 
     private static class ConcatJob implements ComputeJob<String> {
         @Override
-        public String execute(JobExecutionContext context, Object... args) {
+        public CompletableFuture<String> executeAsync(JobExecutionContext 
context, Object... args) {
             if (args == null) {
-                return null;
+                return nullCompletedFuture();
             }
 
-            return Arrays.stream(args).map(o -> o == null ? "null" : 
o.toString()).collect(Collectors.joining("_"));
+            return completedFuture(
+                    Arrays.stream(args).map(o -> o == null ? "null" : 
o.toString()).collect(Collectors.joining("_")));
         }
     }
 
     private static class IgniteExceptionJob implements ComputeJob<String> {
         @Override
-        public String execute(JobExecutionContext context, Object... args) {
+        public CompletableFuture<String> executeAsync(JobExecutionContext 
context, Object... args) {
             throw new CustomException(TRACE_ID, COLUMN_ALREADY_EXISTS_ERR, 
"Custom job error", null);
         }
     }
 
     private static class ExceptionJob implements ComputeJob<String> {
         @Override
-        public String execute(JobExecutionContext context, Object... args) {
-            throw new ArithmeticException("math err");
+        public CompletableFuture<String> executeAsync(JobExecutionContext 
context, Object... args) {
+            boolean asyncJob = args.length > 0 && (Boolean) args[0];
+
+            if (asyncJob) {
+                return CompletableFuture.failedFuture(new 
ArithmeticException("math err"));

Review Comment:
   Fixed.



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