Skip to content

Commit e3a5360

Browse files
committed
fixups post reviews
1 parent 1166011 commit e3a5360

File tree

4 files changed

+4
-25
lines changed

4 files changed

+4
-25
lines changed

tests/functional/aws-node-sdk/test/object/bigMpu.js

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ describe('large mpu', function tester() {
6161
// another request after first request has already deleted parts,
6262
// causing InvalidPart. Meanwhile, if request takes too long to finish,
6363
// sdk will create SocketHangUp error before response.
64-
// Custom request handler with no timeouts
6564
const requestHandler = new NodeHttpHandler({
6665
requestTimeout: 0,
6766
connectionTimeout: 0,
@@ -94,19 +93,17 @@ describe('large mpu', function tester() {
9493
itSkipIfAWS('should intiate, put parts and complete mpu ' +
9594
`with ${partCount} parts`, done => {
9695
process.stdout.write('***Running large MPU test***\n');
97-
let uploadId;
96+
let uploadId;
9897
return waterfall([
9998
next => {
10099
s3.send(new CreateMultipartUploadCommand({ Bucket: bucket, Key: key }))
101100
.then(data => {
102-
process.stdout.write('initiated mpu\n');
103101
uploadId = data.UploadId;
104102
return next();
105103
})
106104
.catch(err => next(err));
107105
},
108106
next => {
109-
process.stdout.write('putting parts\n');
110107
return timesLimit(partCount, 20, (n, cb) =>
111108
uploadPart(n, uploadId, s3, cb), err => {
112109
if (err) {
@@ -135,19 +132,14 @@ describe('large mpu', function tester() {
135132
},
136133
};
137134
return s3.send(new CompleteMultipartUploadCommand(params))
138-
.then(() => {
139-
process.stdout.write('mpu completed successfully\n');
140-
next();
141-
})
135+
.then(() => next())
142136
.catch(err => next(err));
143137
},
144138
next => {
145-
process.stdout.write('about to get object\n');
146139
s3.send(new GetObjectCommand({ Bucket: bucket, Key: key }))
147140
.then(data => {
148141
assert.strictEqual(data.ETag,
149142
`"${finalETag}-${partCount}"`);
150-
process.stdout.write('get object successful\n');
151143
return next();
152144
})
153145
.catch(err => next(err));

tests/functional/aws-node-sdk/test/object/getObjectLegalHold.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,8 @@ describeSkipIfCeph('GET object legal hold', () => {
104104
throw new Error('Expected NoSuchKey error');
105105
}).catch(err => {
106106
checkError(err, 'NoSuchKey', 404);
107-
})).catch(err => {
107+
})
108+
).catch(err => {
108109
assert.ifError(err);
109110
})
110111
);

tests/functional/aws-node-sdk/test/object/getPartSize.js

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -59,18 +59,12 @@ describe('Part size tests with object head', () => {
5959
before(async () => {
6060
bucketUtil = new BucketUtility('default', sigCfg);
6161
s3 = bucketUtil.s3;
62-
63-
// Create bucket
6462
await s3.send(new CreateBucketCommand({ Bucket: bucket }));
65-
66-
// Create multipart upload
6763
const uploadResult = await s3.send(new CreateMultipartUploadCommand({
6864
Bucket: bucket,
6965
Key: object
7066
}));
7167
uploadId = uploadResult.UploadId;
72-
73-
// Upload parts
7468
const uploadPromises = partNumbers.map(async partNumber => {
7569
const uploadPartParams = {
7670
Bucket: bucket,
@@ -82,24 +76,17 @@ describe('Part size tests with object head', () => {
8276
const result = await s3.send(new UploadPartCommand(uploadPartParams));
8377
return result.ETag;
8478
});
85-
8679
ETags = await Promise.all(uploadPromises);
87-
88-
// Put empty object
8980
await s3.send(new PutObjectCommand({
9081
Bucket: bucket,
9182
Key: emptyObject,
9283
Body: '',
9384
}));
94-
95-
// Put non-MPU object
9685
await s3.send(new PutObjectCommand({
9786
Bucket: bucket,
9887
Key: nonMpuObject,
9988
Body: generateContent(0),
10089
}));
101-
102-
// Complete multipart upload
10390
const completeParams = {
10491
Bucket: bucket,
10592
Key: object,

tests/functional/aws-node-sdk/test/object/mpu.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
const assert = require('assert');
32
const {
43
CreateBucketCommand,

0 commit comments

Comments
 (0)