mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-15 14:43:46 +01:00
Merge pull request #28543 from overleaf/msm-disable-retries-s3
[object-persistor] fix disable retries on PutObjectCommand GitOrigin-RevId: 7a812385e70781939f21325572c0eedb856e734f
This commit is contained in:
@@ -594,10 +594,24 @@ describe('S3PersistorTests', function () {
|
||||
partSize: 100 * 1024 * 1024,
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
describe('when multipart upload is disabled', function () {
|
||||
const contentType = 'text/csv'
|
||||
const contentEncoding = 'gzip'
|
||||
|
||||
beforeEach(async function () {
|
||||
S3.mockSend(S3.PutObjectCommand, {})
|
||||
settings.disableMultiPartUpload = true
|
||||
await S3Persistor.sendStream(bucket, key, ReadStream, {
|
||||
contentType,
|
||||
contentEncoding,
|
||||
})
|
||||
})
|
||||
|
||||
it('configures the options to not to retry requests', function () {
|
||||
expect(S3.S3Client).not.to.have.been.calledWithMatch({
|
||||
maxAttempts: sinon.match.number,
|
||||
expect(S3.S3Client).to.have.been.calledWithMatch({
|
||||
maxAttempts: 1,
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user