deflake a resource quota check for best-effort pods

This commit is contained in:
pacoxu 2021-02-09 14:29:32 +08:00
parent 15a8a8ec4a
commit a2f87acb97

View File

@ -43,7 +43,7 @@ import (
const (
// how long to wait for a resource quota update to occur
resourceQuotaTimeout = 30 * time.Second
resourceQuotaTimeout = time.Minute
podName = "pfpod"
)
@ -1734,7 +1734,7 @@ func waitForResourceQuota(c clientset.Interface, ns, quotaName string, used v1.R
// updateResourceQuotaUntilUsageAppears updates the resource quota object until the usage is populated
// for the specific resource name.
func updateResourceQuotaUntilUsageAppears(c clientset.Interface, ns, quotaName string, resourceName v1.ResourceName) error {
return wait.Poll(framework.Poll, 1*time.Minute, func() (bool, error) {
return wait.Poll(framework.Poll, resourceQuotaTimeout, func() (bool, error) {
resourceQuota, err := c.CoreV1().ResourceQuotas(ns).Get(context.TODO(), quotaName, metav1.GetOptions{})
if err != nil {
return false, err