From e0174b6021a0aa853d62ef71be9a6ce1e1c07418 Mon Sep 17 00:00:00 2001 From: Shailesh Jagannath Padave Date: Wed, 27 Nov 2024 16:45:17 +0530 Subject: [PATCH] if totalTaskTimeOut is 0 we shoudl return --- .../com/netflix/conductor/core/execution/DeciderService.java | 1 + .../com/netflix/conductor/core/execution/TestDeciderService.java | 1 + 2 files changed, 2 insertions(+) diff --git a/core/src/main/java/com/netflix/conductor/core/execution/DeciderService.java b/core/src/main/java/com/netflix/conductor/core/execution/DeciderService.java index 873900de0..66f9cd578 100644 --- a/core/src/main/java/com/netflix/conductor/core/execution/DeciderService.java +++ b/core/src/main/java/com/netflix/conductor/core/execution/DeciderService.java @@ -706,6 +706,7 @@ void checkTaskTimeout(TaskDef taskDef, TaskModel task) { } if (task.getStatus().isTerminal() || taskDef.getTimeoutSeconds() <= 0 + || taskDef.getTotalTimeoutSeconds() <= 0 || task.getStartTime() <= 0) { return; } diff --git a/core/src/test/java/com/netflix/conductor/core/execution/TestDeciderService.java b/core/src/test/java/com/netflix/conductor/core/execution/TestDeciderService.java index 1c9e23c5c..b0e8f88a5 100644 --- a/core/src/test/java/com/netflix/conductor/core/execution/TestDeciderService.java +++ b/core/src/test/java/com/netflix/conductor/core/execution/TestDeciderService.java @@ -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());