mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 11:21:47 +00:00
Fix panic in TestUnschedulableNodes
This commit is contained in:
parent
ff1258a29e
commit
80d1ae7642
@ -109,7 +109,15 @@ func waitForReflection(t *testing.T, s cache.Store, key string, passFunc func(n
|
||||
if n, _, err := s.GetByKey(key); err == nil && passFunc(n) {
|
||||
return true, nil
|
||||
} else {
|
||||
nodes = append(nodes, n.(*api.Node))
|
||||
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