Merge pull request #127915 from omerap12/apiserver-util-PollUntilContextTimeout

Use PollUntilContextTimeout in flowcontrol
This commit is contained in:
Kubernetes Prow Robot 2024-10-23 02:21:49 +01:00 committed by GitHub
commit 9c430b2f77
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 3 deletions

View File

@ -129,7 +129,7 @@ func TestQueueWaitTimeLatencyTracker(t *testing.T) {
}()
// ensure that the controller has run its first loop.
err := wait.PollImmediate(100*time.Millisecond, 5*time.Second, func() (done bool, err error) {
err := wait.PollUntilContextTimeout(context.Background(), 100*time.Millisecond, 5*time.Second, true, func(ctx context.Context) (bool, error) {
return controller.hasPriorityLevelState(plcObj.Name), nil
})
if err != nil {

View File

@ -165,7 +165,7 @@ func TestBorrowing(t *testing.T) {
}()
// ensure that the controller has run its first loop.
err := wait.PollImmediate(100*time.Millisecond, 5*time.Second, func() (done bool, err error) {
err := wait.PollUntilContextTimeout(ctx, 100*time.Millisecond, 5*time.Second, true, func(ctx context.Context) (bool, error) {
return controller.hasPriorityLevelState(plcObjs[0].Name), nil
})
if err != nil {

View File

@ -407,7 +407,7 @@ func TestAPFControllerWithGracefulShutdown(t *testing.T) {
}()
// ensure that the controller has run its first loop.
err := wait.PollImmediate(100*time.Millisecond, 5*time.Second, func() (done bool, err error) {
err := wait.PollUntilContextTimeout(ctx, 100*time.Millisecond, 5*time.Second, true, func(ctx context.Context) (bool, error) {
return controller.hasPriorityLevelState(plName), nil
})
if err != nil {