e2e storage: restore timeout behavior in "CSI NodeStage error cases"

In v1.26.0, these tests only used the timeout context while waiting for a CSI
call. This restores that behavior, just in case that it is relevant. No test
flakes are known because of this.
This commit is contained in:
Patrick Ohly 2022-12-19 12:48:51 +01:00
parent a2722ffa4a
commit 6c957c0634

View File

@ -155,14 +155,14 @@ var _ = utils.SIGDescribe("CSI Mock volume node stage", func() {
ginkgo.By("Waiting for expected CSI calls")
// Watch for all calls up to deletePod = true
ctx, cancel := context.WithTimeout(ctx, csiPodRunningTimeout)
timeoutCtx, cancel := context.WithTimeout(ctx, csiPodRunningTimeout)
defer cancel()
for {
if ctx.Err() != nil {
if timeoutCtx.Err() != nil {
framework.Failf("timed out waiting for the CSI call that indicates that the pod can be deleted: %v", test.expectedCalls)
}
time.Sleep(1 * time.Second)
_, index, err := compareCSICalls(ctx, trackedCalls, test.expectedCalls, m.driver.GetCalls)
_, index, err := compareCSICalls(timeoutCtx, trackedCalls, test.expectedCalls, m.driver.GetCalls)
framework.ExpectNoError(err, "while waiting for initial CSI calls")
if index == 0 {
// No CSI call received yet