mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-20 09:33:52 +00:00
Update e2e tests to list only schedulable nodes, to make them work with master Node registered.
This commit is contained in:
@@ -161,11 +161,11 @@ func checkNodesReady(c *client.Client, nt time.Duration, expect int) ([]string,
|
||||
var errLast error
|
||||
start := time.Now()
|
||||
found := wait.Poll(poll, nt, func() (bool, error) {
|
||||
// Even though listNodes(...) has its own retries, a rolling-update
|
||||
// (GCE/GKE implementation of restart) can complete before the apiserver
|
||||
// A rolling-update (GCE/GKE implementation of restart) can complete before the apiserver
|
||||
// knows about all of the nodes. Thus, we retry the list nodes call
|
||||
// until we get the expected number of nodes.
|
||||
nodeList, errLast = listNodes(c, labels.Everything(), fields.Everything())
|
||||
nodeList, errLast = c.Nodes().List(api.ListOptions{
|
||||
FieldSelector: fields.Set{"spec.unschedulable": "false"}.AsSelector()})
|
||||
if errLast != nil {
|
||||
return false, nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user