fix testMultipartUploadFailure to properly cleanup (#11137)

This commit is contained in:
Yingrong Zhao 2020-12-21 11:23:27 -05:00 committed by GitHub
parent 4cc500a041
commit 6df6ac0f34
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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
]);
}
}
/**