From 32d1241a3f53f11fef4180cf6919bd386c8d2c17 Mon Sep 17 00:00:00 2001 From: andyzhangx Date: Wed, 11 Oct 2023 02:07:26 +0000 Subject: [PATCH] test: sleep 5s in snapshot e2e test --- .../dynamically_provisioned_volume_snapshot_tester.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/e2e/testsuites/dynamically_provisioned_volume_snapshot_tester.go b/test/e2e/testsuites/dynamically_provisioned_volume_snapshot_tester.go index ef4d5b6361..f44386d03b 100644 --- a/test/e2e/testsuites/dynamically_provisioned_volume_snapshot_tester.go +++ b/test/e2e/testsuites/dynamically_provisioned_volume_snapshot_tester.go @@ -18,6 +18,7 @@ package testsuites import ( "context" + "time" "sigs.k8s.io/azurefile-csi-driver/test/e2e/driver" @@ -58,6 +59,9 @@ func (t *DynamicallyProvisionedVolumeSnapshotTest) Run(ctx context.Context, clie tvsc, cleanup := CreateVolumeSnapshotClass(ctx, restclient, namespace, t.CSIDriver) defer cleanup() + ginkgo.By("sleeping for 5 seconds to wait for data to be written to the volume") + time.Sleep(5 * time.Second) + ginkgo.By("taking snapshots") snapshot := tvsc.CreateSnapshot(ctx, tpvc.persistentVolumeClaim) defer tvsc.DeleteSnapshot(ctx, snapshot)