mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 22:23:42 +01:00
Merge pull request #1256 from sharelatex/sk-file-upload-retry
Add a retry around `FileStoreHandler.uploadFileFromDisk` GitOrigin-RevId: 2fc54036acdeda15c00a3d0222fd1a83683a5798
This commit is contained in:
committed by
sharelatex
parent
362c1f64db
commit
c423e483ba
@@ -115,6 +115,7 @@ describe "FileStoreHandler", ->
|
||||
cb({statusCode: 500})
|
||||
|
||||
it 'should callback with an error', (done) ->
|
||||
@fs.createReadStream.callCount = 0
|
||||
@fs.createReadStream.returns
|
||||
pipe:->
|
||||
on: (type, cb)->
|
||||
@@ -123,6 +124,7 @@ describe "FileStoreHandler", ->
|
||||
@handler.uploadFileFromDisk @project_id, @file_id, @fsPath, (err) =>
|
||||
expect(err).to.exist
|
||||
expect(err).to.be.instanceof Error
|
||||
expect(@fs.createReadStream.callCount).to.equal @handler.RETRY_ATTEMPTS
|
||||
done()
|
||||
|
||||
describe "deleteFile", ->
|
||||
|
||||
Reference in New Issue
Block a user