mirror of
https://github.com/intel/intel-device-plugins-for-kubernetes.git
synced 2025-06-03 03:59:37 +00:00
e2e: utils: fix WaitForNodesWithResource timeout
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
This commit is contained in:
parent
43bd592790
commit
3b857f878a
@ -36,7 +36,6 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
nodeListTimeout = 10 * time.Second
|
|
||||||
poll = time.Second
|
poll = time.Second
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -48,7 +47,7 @@ func WaitForNodesWithResource(c clientset.Interface, res v1.ResourceName, timeou
|
|||||||
|
|
||||||
err := wait.Poll(poll, timeout,
|
err := wait.Poll(poll, timeout,
|
||||||
func() (bool, error) {
|
func() (bool, error) {
|
||||||
for t := time.Now(); time.Since(t) < nodeListTimeout; time.Sleep(poll) {
|
for t := time.Now(); time.Since(t) < timeout; time.Sleep(poll) {
|
||||||
nodelist, err := c.CoreV1().Nodes().List(context.TODO(), metav1.ListOptions{})
|
nodelist, err := c.CoreV1().Nodes().List(context.TODO(), metav1.ListOptions{})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return false, err
|
return false, err
|
||||||
|
Loading…
Reference in New Issue
Block a user