From 1f0485b4b598237dfce60cb2f117370bda3c65d8 Mon Sep 17 00:00:00 2001 From: Angel Velazquez Date: Fri, 12 Nov 2021 17:46:56 -0800 Subject: [PATCH] Lower minimum task clean up duration from one minute to one second --- agent/config/config.go | 2 +- agent/config/config_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/agent/config/config.go b/agent/config/config.go index 9ea42df06d3..d9307b8cad3 100644 --- a/agent/config/config.go +++ b/agent/config/config.go @@ -92,7 +92,7 @@ const ( // minimumTaskCleanupWaitDuration specifies the minimum duration to wait before cleaning up // a task's container. This is used to enforce sane values for the config.TaskCleanupWaitDuration field. - minimumTaskCleanupWaitDuration = 1 * time.Minute + minimumTaskCleanupWaitDuration = time.Second // minimumImagePullInactivityTimeout specifies the minimum amount of time for that an image can be // 'stuck' in the pull / unpack step. Very small values are unsafe and lead to high failure rate. diff --git a/agent/config/config_test.go b/agent/config/config_test.go index 1664cf178b1..dd4aac1bb62 100644 --- a/agent/config/config_test.go +++ b/agent/config/config_test.go @@ -493,7 +493,7 @@ func TestValidFormatParseEnvVariableDuration(t *testing.T) { func TestInvalidTaskCleanupTimeoutOverridesToThreeHours(t *testing.T) { defer setTestRegion()() - setTestEnv("ECS_ENGINE_TASK_CLEANUP_WAIT_DURATION", "1s") + setTestEnv("ECS_ENGINE_TASK_CLEANUP_WAIT_DURATION", "1ms") cfg, err := NewConfig(ec2.NewBlackholeEC2MetadataClient()) assert.NoError(t, err)