From e258228e4ac30582ee45a4ae6b083ee05b12bebc Mon Sep 17 00:00:00 2001 From: Todd Neal Date: Thu, 10 Aug 2023 12:21:57 -0500 Subject: [PATCH] use a buffer equivalent to grace period to eliminate test flakes This modifies the test to wait up to 2x the grace period for the pod to be removed. --- test/e2e_node/container_lifecycle_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/e2e_node/container_lifecycle_test.go b/test/e2e_node/container_lifecycle_test.go index 29512c33947..421e5610c4e 100644 --- a/test/e2e_node/container_lifecycle_test.go +++ b/test/e2e_node/container_lifecycle_test.go @@ -540,10 +540,10 @@ var _ = SIGDescribe("[NodeConformance] Containers Lifecycle ", func() { } } - // To account for the time it takes to delete the pod, we add a 10 second - // buffer. The 10 second buffer is arbitrary, but it should be enough to - // account for the time it takes to delete the pod. - bufferSeconds := int64(10) + // To account for the time it takes to delete the pod, we add a buffer. Its sized + // so that we allow up to 2x the grace time to delete the pod. Its extra large to + // reduce test flakes. + bufferSeconds := int64(30) ginkgo.It("should respect termination grace period seconds [NodeConformance]", func() { client := e2epod.NewPodClient(f)