mirror of
https://git.mirrors.martin98.com/https://github.com/actions/toolkit
synced 2026-03-15 22:22:35 +08:00
Added custom promise with timeout
This commit is contained in:
7
packages/cache/__tests__/options.test.ts
vendored
7
packages/cache/__tests__/options.test.ts
vendored
@@ -8,6 +8,7 @@ import {
|
||||
const useAzureSdk = true
|
||||
const downloadConcurrency = 8
|
||||
const timeoutInMs = 30000
|
||||
const abortTimeInMs = 2700000
|
||||
const uploadConcurrency = 4
|
||||
const uploadChunkSize = 32 * 1024 * 1024
|
||||
|
||||
@@ -17,7 +18,8 @@ test('getDownloadOptions sets defaults', async () => {
|
||||
expect(actualOptions).toEqual({
|
||||
useAzureSdk,
|
||||
downloadConcurrency,
|
||||
timeoutInMs
|
||||
timeoutInMs,
|
||||
abortTimeInMs
|
||||
})
|
||||
})
|
||||
|
||||
@@ -25,7 +27,8 @@ test('getDownloadOptions overrides all settings', async () => {
|
||||
const expectedOptions: DownloadOptions = {
|
||||
useAzureSdk: false,
|
||||
downloadConcurrency: 14,
|
||||
timeoutInMs: 20000
|
||||
timeoutInMs: 20000,
|
||||
abortTimeInMs: 2700000
|
||||
}
|
||||
|
||||
const actualOptions = getDownloadOptions(expectedOptions)
|
||||
|
||||
Reference in New Issue
Block a user