Skip to content

Commit

Permalink
fix bugs
Browse files Browse the repository at this point in the history
Signed-off-by: shuming.li <[email protected]>
  • Loading branch information
LiShuMing committed Oct 10, 2024
1 parent 05e0b4e commit 76585cc
Showing 1 changed file with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -799,4 +799,21 @@ public ConnectContext getRunCtx() {
taskRunManager.killTaskRun(1L, true);
Assert.assertEquals(0, taskRunScheduler.getRunningTaskCount());
}

@Test
public void testTaskRunDefinition() {
Task task = new Task("test");
task.setDefinition("select 1");
long taskId = 1;
TaskRun taskRun = TaskRunBuilder
.newBuilder(task)
.setExecuteOption(DEFAULT_MERGE_OPTION)
.build();
long now = System.currentTimeMillis();
taskRun.setTaskId(taskId);
taskRun.initStatus("1", now + 10);
taskRun.getStatus().setPriority(0);
TaskRunStatus taskRunStatus = taskRun.getStatus();
Assert.assertEquals(taskRunStatus.getDefinition(), "select 1");
}
}

0 comments on commit 76585cc

Please sign in to comment.