mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-07 19:23:40 +00:00
Merge pull request #27345 from wojtek-t/fix_unschedulable_nodes
Automatic merge from submit-queue Fix panic in TestUnschedulableNodes Fix #27344
This commit is contained in:
commit
970104df31
@ -108,8 +108,16 @@ func waitForReflection(t *testing.T, s cache.Store, key string, passFunc func(n
|
||||
err := wait.Poll(time.Millisecond*100, wait.ForeverTestTimeout, func() (bool, error) {
|
||||
if n, _, err := s.GetByKey(key); err == nil && passFunc(n) {
|
||||
return true, nil
|
||||
} else {
|
||||
if err != nil {
|
||||
t.Errorf("Unexpected error: %v", err)
|
||||
} else {
|
||||
if n == nil {
|
||||
nodes = append(nodes, nil)
|
||||
} else {
|
||||
nodes = append(nodes, n.(*api.Node))
|
||||
}
|
||||
}
|
||||
return false, nil
|
||||
}
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user