mirror of
https://git.mirrors.martin98.com/https://github.com/actions/toolkit
synced 2026-04-24 19:58:04 +08:00
Set default concurrency to 10 and make timeout configurable
This commit is contained in:
@@ -30,3 +30,19 @@ describe('isGhes', () => {
|
||||
expect(config.isGhes()).toBe(true)
|
||||
})
|
||||
})
|
||||
|
||||
describe('uploadChunkTimeoutEnv', () => {
|
||||
it('should return default 300000 when no env set', () => {
|
||||
expect(config.getUploadChunkTimeout()).toBe(300000)
|
||||
})
|
||||
it('should return value set in ACTIONS_UPLOAD_TIMEOUT_MS', () => {
|
||||
process.env.ACTIONS_UPLOAD_TIMEOUT_MS = '150000'
|
||||
expect(config.getUploadChunkTimeout()).toBe(150000)
|
||||
})
|
||||
it('should throw if value set in ACTIONS_UPLOAD_TIMEOUT_MS is invalid', () => {
|
||||
process.env.ACTIONS_UPLOAD_TIMEOUT_MS = 'abc'
|
||||
expect(() => {
|
||||
config.getUploadChunkTimeout()
|
||||
}).toThrow()
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user