Added custom promise with timeout

This commit is contained in:
Sankalp Kotewar committed 2022-08-03 13:25:47 +00:00
1 parent 3c8d7fb1c3
commit 3e991a3fe9
2 files changed
+30 -16

No files matched your search

+5 -2
View File
@@ -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)