From 6df6ac0f34107e51c2072538320657beb701532c Mon Sep 17 00:00:00 2001 From: Yingrong Zhao Date: Mon, 21 Dec 2020 11:23:27 -0500 Subject: [PATCH] fix testMultipartUploadFailure to properly cleanup (#11137) --- mint/run/core/aws-sdk-php/quick-tests.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/mint/run/core/aws-sdk-php/quick-tests.php b/mint/run/core/aws-sdk-php/quick-tests.php index cf00cb8be..3a138aec1 100644 --- a/mint/run/core/aws-sdk-php/quick-tests.php +++ b/mint/run/core/aws-sdk-php/quick-tests.php @@ -506,7 +506,15 @@ function testMultipartUploadFailure($s3Client, $params) { ], ], ]; - runExceptionalTests($s3Client, 'completeMultipartUpload', 'getAwsErrorCode', $params); + try { + runExceptionalTests($s3Client, 'completeMultipartUpload', 'getAwsErrorCode', $params); + }finally { + $s3Client->abortMultipartUpload([ + 'Bucket' => $bucket, + 'Key' => $object, + 'UploadId' => $uploadId + ]); + } } /**