xtern commented on code in PR #4898: URL: https://github.com/apache/ignite-3/pull/4898#discussion_r1888050049
########## 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))); + + UUID jobId = await(execution.idAsync()); + assertThat(jobId, not(nullValue())); + assertThat(executeKillJob(node, jobId), is(true)); + + Awaitility.await().until(execution::stateAsync, willBe(jobStateWithStatus(CANCELED))); + + assertThat(executeKillJob(node, jobId), is(false)); + assertThat(executeKill(node, COMPUTE, jobId, true), is(true)); } @Test public void killQueryFromRemote() { Review Comment: Do you mean something that doesn't fit on a single page? i.e. `SELECT x FROM system_range(0, 100000)`? -- 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