ic4y commented on code in PR #2456:
URL: 
https://github.com/apache/incubator-seatunnel/pull/2456#discussion_r949752234


##########
seatunnel-engine/seatunnel-engine-server/src/test/java/org/apache/seatunnel/engine/server/TaskExecutionServiceTest.java:
##########
@@ -87,16 +87,15 @@ public void testCancel() {
         long sleepTime = 300;
 
         AtomicBoolean stop = new AtomicBoolean(false);
-        TestTask testTask1 = new TestTask(stop, logger, sleepTime,true);
-        TestTask testTask2 = new TestTask(stop, logger, sleepTime,false);
-
-        CompletableFuture<Void> cancellationFuture = new 
CompletableFuture<Void>();
+        TestTask testTask1 = new TestTask(stop, logger, sleepTime, true);
+        TestTask testTask2 = new TestTask(stop, logger, sleepTime, false);
 
-        CompletableFuture<TaskExecutionState> completableFuture = 
taskExecutionService.submitTaskGroup(new TaskGroupDefaultImpl("ts", 
Lists.newArrayList(testTask1,testTask2)), cancellationFuture);
+        long taskGroupId = flakeIdGenerator.newId();
+        CompletableFuture<TaskExecutionState> completableFuture = 
taskExecutionService.deployLocalTask(new TaskGroupDefaultImpl(taskGroupId, 
"ts", Lists.newArrayList(testTask1, testTask2)), new CompletableFuture<>());
 
-        cancellationFuture.cancel(true);
+        taskExecutionService.cancelTaskGroup(taskGroupId);
 
-        await().atMost(sleepTime + 300, 
TimeUnit.MILLISECONDS).untilAsserted(()->{
+        await().atMost(sleepTime + 300, 
TimeUnit.MILLISECONDS).untilAsserted(() -> {

Review Comment:
   My mistake, my idea CheckStyle didn't cover the test, I've fixed it



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