From 5089af1f23c7c7de357b1a46429c9424d9a0aa2e Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Fri, 26 Feb 2021 20:48:02 +0100 Subject: [PATCH] e2e test: relax CSI call expectations NodeUnstageVolume and DeleteVolume are not necessarily ordered and in practice, DeleteVolume was indeed encountered first after changing the timing by embedding the CSI driver: Kubernetes e2e suite: [sig-storage] CSI mock volume storage capacity exhausted, immediate binding expand_less 7m34s test/e2e/storage/csi_mock_volume.go:953 Feb 26 18:34:04.037: while waiting for all CSI calls Unexpected error: <*errors.errorString | 0xc00322b9c0>: { s: "error waiting for expected CSI calls: Unexpected CSI call 3: expected NodeUnstageVolume (0), got DeleteVolume (0)", } error waiting for expected CSI calls: Unexpected CSI call 3: expected NodeUnstageVolume (0), got DeleteVolume (0) occurred test/e2e/storage/csi_mock_volume.go:1045 --- test/e2e/storage/csi_mock_volume.go | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/test/e2e/storage/csi_mock_volume.go b/test/e2e/storage/csi_mock_volume.go index 7f38af408ec..b785f5d416b 100644 --- a/test/e2e/storage/csi_mock_volume.go +++ b/test/e2e/storage/csi_mock_volume.go @@ -927,9 +927,9 @@ var _ = utils.SIGDescribe("CSI mock volume", func() { createVolume := "CreateVolume" deleteVolume := "DeleteVolume" // publishVolume := "NodePublishVolume" - unpublishVolume := "NodeUnpublishVolume" + // unpublishVolume := "NodeUnpublishVolume" // stageVolume := "NodeStageVolume" - unstageVolume := "NodeUnstageVolume" + // unstageVolume := "NodeUnstageVolume" // These calls are assumed to occur in this order for // each test run. NodeStageVolume and @@ -939,12 +939,17 @@ var _ = utils.SIGDescribe("CSI mock volume", func() { // (https://github.com/kubernetes/kubernetes/issues/90250). // Therefore they are temporarily commented out until // that issue is resolved. + // + // NodeUnpublishVolume and NodeUnstageVolume are racing + // with DeleteVolume, so we cannot assume a deterministic + // order and have to ignore them + // (https://github.com/kubernetes/kubernetes/issues/94108). deterministicCalls := []string{ createVolume, // stageVolume, // publishVolume, - unpublishVolume, - unstageVolume, + // unpublishVolume, + // unstageVolume, deleteVolume, }