mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 10:33:35 +00:00
e2e: re-use context.Context
for PollUntilContextTimeout()
calls
There are many locations where a new context is created. These can be reduced when subsequent calls re-use a previously created context object. Signed-off-by: Niels de Vos <ndevos@ibm.com>
This commit is contained in:
committed by
mergify[bot]
parent
2884b0dde7
commit
439918c10d
@ -102,8 +102,8 @@ func createCephfsStorageClass(
|
||||
|
||||
timeout := time.Duration(deployTimeout) * time.Minute
|
||||
|
||||
return wait.PollUntilContextTimeout(context.TODO(), poll, timeout, true, func(_ context.Context) (bool, error) {
|
||||
_, err = c.StorageV1().StorageClasses().Create(context.TODO(), &sc, metav1.CreateOptions{})
|
||||
return wait.PollUntilContextTimeout(context.TODO(), poll, timeout, true, func(ctx context.Context) (bool, error) {
|
||||
_, err = c.StorageV1().StorageClasses().Create(ctx, &sc, metav1.CreateOptions{})
|
||||
if err != nil {
|
||||
framework.Logf("error creating StorageClass %q: %v", sc.Name, err)
|
||||
if isRetryableAPIError(err) {
|
||||
|
Reference in New Issue
Block a user