mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 19:31:44 +00:00
Merge pull request #42069 from smarterclayton/fix_pod_timeout
Automatic merge from submit-queue (batch tested with PRs 42106, 42094, 42069, 42098, 41852) Pod deletion observation is flaking, increase timeout and debug more We can afford to wait longer than 30 seconds, and we should be printing more error and output information about the cause of the failure. Fixes / triages #41902
This commit is contained in:
commit
ece8b674fb
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user