Merge pull request #114573 from pohly/e2e-ginkgo-timeout-fixes

e2e ginkgo timeout fixes, II
This commit is contained in:
Kubernetes Prow Robot 2022-12-19 04:43:44 -08:00 committed by GitHub
commit a864583905
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 6 deletions

View File

@ -93,9 +93,9 @@ var _ = SIGDescribe("LimitRange", func() {
_, informer, w, _ := watchtools.NewIndexerInformerWatcher(lw, &v1.LimitRange{}) _, informer, w, _ := watchtools.NewIndexerInformerWatcher(lw, &v1.LimitRange{})
defer w.Stop() defer w.Stop()
ctx, cancelCtx := context.WithTimeout(ctx, wait.ForeverTestTimeout) timeoutCtx, cancel := context.WithTimeout(ctx, wait.ForeverTestTimeout)
defer cancelCtx() defer cancel()
if !cache.WaitForCacheSync(ctx.Done(), informer.HasSynced) { if !cache.WaitForCacheSync(timeoutCtx.Done(), informer.HasSynced) {
framework.Failf("Timeout while waiting for LimitRange informer to sync") framework.Failf("Timeout while waiting for LimitRange informer to sync")
} }

View File

@ -623,7 +623,6 @@ var _ = SIGDescribe("SchedulerPreemption [Serial]", func() {
*/ */
framework.ConformanceIt("runs ReplicaSets to verify preemption running path", func(ctx context.Context) { framework.ConformanceIt("runs ReplicaSets to verify preemption running path", func(ctx context.Context) {
podNamesSeen := []int32{0, 0, 0} podNamesSeen := []int32{0, 0, 0}
stopCh := make(chan struct{})
// create a pod controller to list/watch pod events from the test framework namespace // create a pod controller to list/watch pod events from the test framework namespace
_, podController := cache.NewInformer( _, podController := cache.NewInformer(
@ -652,8 +651,7 @@ var _ = SIGDescribe("SchedulerPreemption [Serial]", func() {
}, },
}, },
) )
go podController.Run(stopCh) go podController.Run(ctx.Done())
defer close(stopCh)
// prepare three ReplicaSet // prepare three ReplicaSet
rsConfs := []pauseRSConfig{ rsConfs := []pauseRSConfig{