[ 
https://issues.apache.org/jira/browse/IGNITE-23696?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Vadim Pakhnushev reassigned IGNITE-23696:
-----------------------------------------

    Assignee: Vadim Pakhnushev

> Ignite compute, different return result for local and remote execution node
> ---------------------------------------------------------------------------
>
>                 Key: IGNITE-23696
>                 URL: https://issues.apache.org/jira/browse/IGNITE-23696
>             Project: Ignite
>          Issue Type: Bug
>          Components: compute
>    Affects Versions: 3.0.0-beta1
>            Reporter: Evgeny Stanilovsky
>            Assignee: Vadim Pakhnushev
>            Priority: Major
>              Labels: ignite-3
>
> Results of below test must not depend on execution node, but they depend:
> place near test into ItComputeBaseTest:
> {code:java}
>     @ParameterizedTest(name = "local: {0}")
>     @ValueSource(booleans = {true, false})
>     void cancelComputeSubmitWithCancelHandle(boolean local) {
>         Ignite entryNode = node(0);
>         Ignite executeNode = local ? node(0) : node(1);
>         JobDescriptor<Long, Void> job = 
> JobDescriptor.builder(SilentSleepJob.class).units(units()).build();
>         JobExecution<Void> execution = 
> entryNode.compute().submit(JobTarget.node(clusterNode(executeNode)), job, 
> null);
>         IgniteTestUtils.await(execution.cancelAsync());
>         assertThat(execution.stateAsync(), 
> willBe(jobStateWithStatus(CANCELED)));
>         assertThat(execution.resultAsync(), willBe(nullValue()));
>     }
> {code}
> {code:java}
> package org.apache.ignite.internal.compute;
> import java.util.concurrent.CompletableFuture;
> import java.util.concurrent.CountDownLatch;
> import org.apache.ignite.compute.ComputeJob;
> import org.apache.ignite.compute.JobExecutionContext;
> public class SilentSleepJob implements ComputeJob<Long, Void> {
>     @Override
>     public CompletableFuture<Void> executeAsync(JobExecutionContext 
> jobExecutionContext, Long timeout) {
>         try {
>             new CountDownLatch(1).await();
>         } catch (InterruptedException e) {
>             // no op.
>         }
>         return null;
>     }
> }
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to