mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-20 18:31:15 +00:00
e2e scheduling: fix scope of context.WithTimeout
The original intend from v1.26.0 was to only apply the timeout to the following cache.WaitForCacheSync.
This commit is contained in:
parent
2ca74f2885
commit
29d6d03a3c
@ -93,9 +93,9 @@ var _ = SIGDescribe("LimitRange", func() {
|
||||
_, informer, w, _ := watchtools.NewIndexerInformerWatcher(lw, &v1.LimitRange{})
|
||||
defer w.Stop()
|
||||
|
||||
ctx, cancelCtx := context.WithTimeout(ctx, wait.ForeverTestTimeout)
|
||||
defer cancelCtx()
|
||||
if !cache.WaitForCacheSync(ctx.Done(), informer.HasSynced) {
|
||||
timeoutCtx, cancel := context.WithTimeout(ctx, wait.ForeverTestTimeout)
|
||||
defer cancel()
|
||||
if !cache.WaitForCacheSync(timeoutCtx.Done(), informer.HasSynced) {
|
||||
framework.Failf("Timeout while waiting for LimitRange informer to sync")
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user