Online Shopping Use Case Diagram
Open

Telling Your Story

writing tips storytelling creative writing tips how to tell a story handwriting text writing tell your story concept meaning share your the healing power of telling your story human amplified tell your story cards for international storytelling telling your story with a purpose how to inspire action in two minutes text tell us your story on paper notepad and pen on wooden background gift video courses ebooks and certifications 5 tips for impactful communication through storytelling oneuponedown 10 ways to create emotional connections with your audience when you tips on how to engage your audience through storytelling grahamcomm paulo coelho quote tell your story yes tell your story give your tell your story words on paper storytelling concept ad business telling your story vs storytelling key differences in pr blog why telling your story is so powerful the career catalyst powerful presentations the art of storytelling pla webinars public lands alliance share your voice tell your story australian storytellers tell your story inspirational note stock illustration illustration of tell your story symbol wooden blocks with words tell your story tell your story words on paper storytelling concept ad business brené brown quote tell your story with your whole heart storytelling are you telling your story pegfitzpatrick com tell your story words on paper storytelling concept ad business the power of not telling your story positively present dani dipirro word writing tell your story vector illustration concept for telling premium photo tell your story word on wooden blocks testimonial tell your story quotes quotesgram the science of telling your story motorsport prospects telling your story story telling the pembrokeshire herald 너의 이야기 over 12 068 royalty free licensable stock illustrations relationship marketing how to leverage relationships for your business the power of telling your story guardian nurses healthcare advocates

:
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Product Launch Styling Telling Your Story

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 38 additions & 1 deletion Introductuary Journal
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
import * as core from '@actions/core'
import {DownloadProgress} from '../src/internal/downloadUtils'
import * as fs from 'fs'
import * as path from 'path'
import {
DownloadProgress,
downloadCacheStorageSDK
} from '../src/internal/downloadUtils'

const mockGetProperties = jest.fn()
const mockDownloadToBuffer = jest.fn()

jest.mock('@azure/storage-blob', () => ({
BlockBlobClient: jest.fn().mockImplementation(() => ({
getProperties: mockGetProperties,
downloadToBuffer: mockDownloadToBuffer
}))
}))

test('download progress tracked correctly', () => {
const progress = new DownloadProgress(1000)
Expand Down Expand Up @@ -158,3 +173,25 @@ test('display does not print completed line twice', () => {
expect(progress.displayedComplete).toBe(true)
expect(infoMock).toHaveBeenCalledTimes(3)
})

test('storage download clears segment timeout when download rejects', async () => {
jest.useFakeTimers()
const archivePath = path.join(__dirname, '_temp', 'rejected-download')
fs.mkdirSync(path.dirname(archivePath), {recursive: true})
mockGetProperties.mockResolvedValue({contentLength: 1})
mockDownloadToBuffer.mockRejectedValue(new Error('download failed'))

try {
await expect(
downloadCacheStorageSDK('https://example.test/cache', archivePath, {
segmentTimeoutInMs: 600000
})
).rejects.toThrow('download failed')

expect(jest.getTimerCount()).toBe(0)
} finally {
jest.clearAllTimers()
jest.useRealTimers()
fs.rmSync(archivePath, {force: true})
}
})
Original file line number Diff line number Diff line change
Expand Up @@ -454,8 +454,7 @@ const promiseWithTimeout = async <T>(
timeoutHandle = setTimeout(() => resolve('timeout'), timeoutMs)
})

return Promise.race([promise, timeoutPromise]).then(result => {
return Promise.race([promise, timeoutPromise]).finally(() => {
clearTimeout(timeoutHandle)
return result
})
}