e2e: accept context from Ginkgo
Every ginkgo callback should return immediately when a timeout occurs or the test run manually gets aborted with CTRL-C. To do that, they must take a ctx parameter and pass it through to all code which might block. This is a first automated step towards that: the additional parameter got added with sed -i 's/\(framework.ConformanceIt\|ginkgo.It\)\(.*\)func() {$/\1\2func(ctx context.Context) {/' \ $(git grep -l -e framework.ConformanceIt -e ginkgo.It ) $GOPATH/bin/goimports -w $(git status | grep modified: | sed -e 's/.* //') log_test.go was left unchanged.
This commit is contained in:
@@ -187,7 +187,7 @@ func containerGCTest(f *framework.Framework, test testRun) {
|
||||
}, setupDuration, runtimePollInterval).Should(gomega.BeNil())
|
||||
})
|
||||
|
||||
ginkgo.It(fmt.Sprintf("Should eventually garbage collect containers when we exceed the number of dead containers per container"), func() {
|
||||
ginkgo.It(fmt.Sprintf("Should eventually garbage collect containers when we exceed the number of dead containers per container"), func(ctx context.Context) {
|
||||
totalContainers := 0
|
||||
for _, pod := range test.testPods {
|
||||
totalContainers += pod.numContainers*2 + 1
|
||||
|
Reference in New Issue
Block a user