Skip to content

Commit

Permalink
if totalTaskTimeOut is 0 we shoudl return
Browse files Browse the repository at this point in the history
  • Loading branch information
Shailesh Jagannath Padave committed Nov 27, 2024
1 parent 79efa13 commit 7f47427
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -706,6 +706,7 @@ void checkTaskTimeout(TaskDef taskDef, TaskModel task) {
}
if (task.getStatus().isTerminal()
|| taskDef.getTimeoutSeconds() <= 0
|| taskDef.getTotalTimeoutSeconds() <= 0
|| task.getStartTime() <= 0) {
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,7 @@ public void testTaskTimeout() {
taskType.setName("test");
taskType.setTimeoutPolicy(TimeoutPolicy.RETRY);
taskType.setTimeoutSeconds(1);
taskType.setTotalTimeoutSeconds(1_000);

TaskModel task = new TaskModel();
task.setTaskType(taskType.getName());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,6 @@
"workflowStatusListenerEnabled": false,
"timeoutPolicy": "ALERT_ONLY",
"timeoutSeconds": 0,
"totalTimeoutSeconds": 50,
"ownerEmail": "test@harness.com"
}

0 comments on commit 7f47427

Please sign in to comment.