Skip to content

Commit 02e4ce6

Browse files
deflake grace period for pod deletion in node e2e
1 parent 0641e0c commit 02e4ce6

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

test/e2e/node/pods.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ var _ = SIGDescribe("Pods Extended", func() {
5555
/*
5656
Release : v1.15
5757
Testname: Pods, delete grace period
58-
Description: Create a pod, make sure it is running. Using the http client send a 'delete' with gracePeriodSeconds=30. Pod SHOULD get deleted within 30 seconds.
58+
Description: Create a pod, make sure it is running. Using the http client send a 'delete' with gracePeriodSeconds=30. Pod SHOULD get terminated within gracePeriodSeconds and removed from API server within a window.
5959
*/
60-
ginkgo.It("should be submitted and removed [Flaky]", func() {
60+
ginkgo.It("should be submitted and removed", func() {
6161
ginkgo.By("creating the pod")
6262
name := "pod-submit-remove-" + string(uuid.NewUUID())
6363
value := strconv.Itoa(time.Now().Nanosecond())
@@ -117,8 +117,11 @@ var _ = SIGDescribe("Pods Extended", func() {
117117

118118
ginkgo.By("verifying the kubelet observed the termination notice")
119119

120+
// allow up to 3x grace period (which allows process termination)
121+
// for the kubelet to remove from api. need to follow-up on if this
122+
// latency between termination and reportal can be isolated further.
120123
start := time.Now()
121-
err = wait.Poll(time.Second*5, time.Second*30, func() (bool, error) {
124+
err = wait.Poll(time.Second*5, time.Second*30*3, func() (bool, error) {
122125
podList, err := e2ekubelet.GetKubeletPods(f.ClientSet, pod.Spec.NodeName)
123126
if err != nil {
124127
framework.Logf("Unable to retrieve kubelet pods for node %v: %v", pod.Spec.NodeName, err)

0 commit comments

Comments
 (0)