mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-08 03:33:56 +00:00
Merge pull request #127915 from omerap12/apiserver-util-PollUntilContextTimeout
Use PollUntilContextTimeout in flowcontrol
This commit is contained in:
commit
9c430b2f77
@ -129,7 +129,7 @@ func TestQueueWaitTimeLatencyTracker(t *testing.T) {
|
|||||||
}()
|
}()
|
||||||
|
|
||||||
// ensure that the controller has run its first loop.
|
// 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
|
return controller.hasPriorityLevelState(plcObj.Name), nil
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -165,7 +165,7 @@ func TestBorrowing(t *testing.T) {
|
|||||||
}()
|
}()
|
||||||
|
|
||||||
// ensure that the controller has run its first loop.
|
// 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
|
return controller.hasPriorityLevelState(plcObjs[0].Name), nil
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -407,7 +407,7 @@ func TestAPFControllerWithGracefulShutdown(t *testing.T) {
|
|||||||
}()
|
}()
|
||||||
|
|
||||||
// ensure that the controller has run its first loop.
|
// 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
|
return controller.hasPriorityLevelState(plName), nil
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user