xtern commented on code in PR #4898: URL: https://github.com/apache/ignite-3/pull/4898#discussion_r1888038273
########## modules/sql-engine/src/integrationTest/java/org/apache/ignite/internal/sql/engine/kill/ItSqlKillCommandTest.java: ########## @@ -95,46 +126,141 @@ public void killQueryFromLocal() { assertThat(queries.size(), is(1)); UUID targetQueryId = queries.get(0).id(); - checkKillQuery(node, targetQueryId, true); + assertThat(executeKillSqlQuery(node, targetQueryId), is(true)); assertThat(runningQueries(), is(empty())); expectQueryCancelled(new DrainCursor(cursor)); - checkKillQuery(node, targetQueryId, false); - checkKillQuery(node, targetQueryId, true, true); + assertThat(executeKillSqlQuery(node, targetQueryId), is(false)); + assertThat(executeKill(node, QUERY, targetQueryId, true), is(true)); + } + + @Test + public void killComputeJobFromLocal() { + Ignite node = CLUSTER.aliveNode(); + JobDescriptor<Void, Void> job = JobDescriptor.builder(InfiniteJob.class).units(List.of()).build(); + JobExecution<Void> execution = node.compute().submit(JobTarget.node(clusterNode(node)), job, null); + + Awaitility.await().until(execution::stateAsync, willBe(jobStateWithStatus(EXECUTING))); Review Comment: Thanks, removed this condition. > why do we need to wait status here ? I thought that we need to wait until task will be deployed and I assumed that if this is not done, there will be a floating error (that we will cancel a non-existent task). But locally I don't see flaky failures so I removed this check here and in the `killComputeJobFromRemote` test. ########## modules/sql-engine/src/integrationTest/java/org/apache/ignite/internal/sql/engine/kill/ItSqlKillCommandTest.java: ########## @@ -95,46 +126,141 @@ public void killQueryFromLocal() { assertThat(queries.size(), is(1)); UUID targetQueryId = queries.get(0).id(); - checkKillQuery(node, targetQueryId, true); + assertThat(executeKillSqlQuery(node, targetQueryId), is(true)); assertThat(runningQueries(), is(empty())); expectQueryCancelled(new DrainCursor(cursor)); - checkKillQuery(node, targetQueryId, false); - checkKillQuery(node, targetQueryId, true, true); + assertThat(executeKillSqlQuery(node, targetQueryId), is(false)); + assertThat(executeKill(node, QUERY, targetQueryId, true), is(true)); + } + + @Test + public void killComputeJobFromLocal() { + Ignite node = CLUSTER.aliveNode(); + JobDescriptor<Void, Void> job = JobDescriptor.builder(InfiniteJob.class).units(List.of()).build(); + JobExecution<Void> execution = node.compute().submit(JobTarget.node(clusterNode(node)), job, null); + + Awaitility.await().until(execution::stateAsync, willBe(jobStateWithStatus(EXECUTING))); Review Comment: Thanks, removed this condition. > why do we need to wait status here ? I thought that we need to wait until task will be deployed and I assumed that if this is not done, there will be a floating error (that we will cancel a non-existent task). But locally I don't see flaky failures so I removed this check here and in the `killComputeJobFromRemote` test. -- 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: notifications-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org