Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pod deletion observation is flaking, increase timeout and debug more #42069

Merged
merged 1 commit into from
Feb 26, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 8 additions & 5 deletions test/e2e/common/pods.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,18 +233,21 @@ var _ = framework.KubeDescribe("Pods", func() {

By("verifying pod deletion was observed")
deleted := false
timeout := false
var lastPod *v1.Pod
timer := time.After(30 * time.Second)
for !deleted && !timeout {
timer := time.After(2 * time.Minute)
for !deleted {
select {
case event, _ := <-w.ResultChan():
if event.Type == watch.Deleted {
switch event.Type {
case watch.Deleted:
lastPod = event.Object.(*v1.Pod)
deleted = true
case watch.Error:
framework.Logf("received a watch error: %v", event.Object)
Fail("watch closed with error")
}
case <-timer:
timeout = true
Fail("timed out waiting for pod deletion")
}
}
if !deleted {
Expand Down