Merge pull request #98906 from pacoxu/deflake/resource-quota

deflake a resource quota check for best-effort pods
This commit is contained in:
Kubernetes Prow Robot 2021-05-05 23:09:15 -07:00 committed by GitHub
commit 25f9b6b1d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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"
)
@ -1830,7 +1830,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