mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 20:53:33 +00:00
Deflake existing configmap count
This commit is contained in:
parent
4364ef6206
commit
cfd74b9570
@ -297,14 +297,14 @@ var _ = SIGDescribe("ResourceQuota", func() {
|
|||||||
framework.ConformanceIt("should create a ResourceQuota and capture the life of a configMap.", func() {
|
framework.ConformanceIt("should create a ResourceQuota and capture the life of a configMap.", func() {
|
||||||
found, unchanged := 0, 0
|
found, unchanged := 0, 0
|
||||||
// On contended servers the service account controller can slow down, leading to the count changing during a run.
|
// On contended servers the service account controller can slow down, leading to the count changing during a run.
|
||||||
// Wait up to 5s for the count to stabilize, assuming that updates come at a consistent rate, and are not held indefinitely.
|
// Wait up to 15s for the count to stabilize, assuming that updates come at a consistent rate, and are not held indefinitely.
|
||||||
wait.Poll(1*time.Second, 30*time.Second, func() (bool, error) {
|
wait.Poll(1*time.Second, time.Minute, func() (bool, error) {
|
||||||
configmaps, err := f.ClientSet.CoreV1().ConfigMaps(f.Namespace.Name).List(context.TODO(), metav1.ListOptions{})
|
configmaps, err := f.ClientSet.CoreV1().ConfigMaps(f.Namespace.Name).List(context.TODO(), metav1.ListOptions{})
|
||||||
framework.ExpectNoError(err)
|
framework.ExpectNoError(err)
|
||||||
if len(configmaps.Items) == found {
|
if len(configmaps.Items) == found {
|
||||||
// loop until the number of configmaps has stabilized for 5 seconds
|
// loop until the number of configmaps has stabilized for 15 seconds
|
||||||
unchanged++
|
unchanged++
|
||||||
return unchanged > 4, nil
|
return unchanged > 15, nil
|
||||||
}
|
}
|
||||||
unchanged = 0
|
unchanged = 0
|
||||||
found = len(configmaps.Items)
|
found = len(configmaps.Items)
|
||||||
|
Loading…
Reference in New Issue
Block a user