Skip to content

Commit 5ff3711

Browse files
committed
additionnal fixups
1 parent bc355f8 commit 5ff3711

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

tests/sur/quota.js

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,6 @@ function objectMPU(bucket, key, parts, partSize, callback) {
177177
Bucket: bucket,
178178
Key: key,
179179
};
180-
if (!s3Config.isQuotaInflightEnabled()) {
181-
mockScuba.incrementBytesForBucket(bucket, parts * partSize);
182-
}
183180
return async.waterfall([
184181
next => s3Client.send(new CreateMultipartUploadCommand(initiateMPUParams))
185182
.then(data => {
@@ -231,12 +228,6 @@ function objectMPU(bucket, key, parts, partSize, callback) {
231228
}
232229

233230
function abortMPU(bucket, key, uploadId, size, callback) {
234-
// Handle case where uploadId is null/undefined
235-
if (!uploadId) {
236-
console.log('Warning: Attempted to abort MPU with null uploadId');
237-
return callback();
238-
}
239-
240231
return s3Client.send(new AbortMultipartUploadCommand({
241232
Bucket: bucket,
242233
Key: key,
@@ -248,14 +239,7 @@ function abortMPU(bucket, key, uploadId, size, callback) {
248239
}
249240
return callback(null, data);
250241
})
251-
.catch(err => {
252-
// Don't fail the test if the abort fails due to the MPU not existing
253-
if (err.name === 'NoSuchUpload') {
254-
console.log('MPU already cleaned up or does not exist');
255-
return callback();
256-
}
257-
return callback(err);
258-
});
242+
.catch(err => callback(err));
259243
}
260244

261245
function uploadPartCopy(bucket, key, partNumber, partSize, sleepDuration, keyToCopy, callback) {

0 commit comments

Comments
 (0)