From 6c957c06347f805eeb8e4ac7358d2387939575c9 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Mon, 19 Dec 2022 12:48:51 +0100 Subject: [PATCH] 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. --- test/e2e/storage/csi_mock/csi_node_stage_error_cases.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/e2e/storage/csi_mock/csi_node_stage_error_cases.go b/test/e2e/storage/csi_mock/csi_node_stage_error_cases.go index bb775b6eb72..d66dca33d4c 100644 --- a/test/e2e/storage/csi_mock/csi_node_stage_error_cases.go +++ b/test/e2e/storage/csi_mock/csi_node_stage_error_cases.go @@ -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