mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 11:21:47 +00:00
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.
This commit is contained in:
parent
ee88325f81
commit
3f04421d7b
@ -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