From 57554dd9bdd81e00a61bdeddb0ac306530c4f677 Mon Sep 17 00:00:00 2001 From: Rattysed <46933547+Rattysed@users.noreply.github.com> Date: Wed, 5 Feb 2025 11:48:27 +0000 Subject: [PATCH] fix TestSnapshotServiceDeleteSnapshotWhenCreationIsInFlight --- .../facade/snapshot_service_test/snapshot_service_test.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cloud/disk_manager/internal/pkg/facade/snapshot_service_test/snapshot_service_test.go b/cloud/disk_manager/internal/pkg/facade/snapshot_service_test/snapshot_service_test.go index bc161bcf344..e306ecd808a 100644 --- a/cloud/disk_manager/internal/pkg/facade/snapshot_service_test/snapshot_service_test.go +++ b/cloud/disk_manager/internal/pkg/facade/snapshot_service_test/snapshot_service_test.go @@ -763,11 +763,13 @@ func TestSnapshotServiceDeleteSnapshotWhenCreationIsInFlight(t *testing.T) { err = internal_client.WaitOperation(ctx, client, operation.Id) require.NoError(t, err) - _ = internal_client.WaitOperation(ctx, client, createOp.Id) + createErr := internal_client.WaitOperation(ctx, client, createOp.Id) // Should wait here because checkpoint is deleted on |createOp| operation // cancel (and exact time of this event is unknown). - testcommon.WaitForCheckpointsAreEmpty(t, ctx, diskID) + if createErr != nil { + testcommon.WaitForCheckpointsAreEmpty(t, ctx, diskID) + } testcommon.CheckConsistency(t, ctx) }