Skip to content

ci: pre-download time-skipping test server before test loop#482

Open
brianstrauch wants to merge 1 commit into
mainfrom
prewarm-test-server
Open

ci: pre-download time-skipping test server before test loop#482
brianstrauch wants to merge 1 commit into
mainfrom
prewarm-test-server

Conversation

@brianstrauch

@brianstrauch brianstrauch commented Jun 23, 2026

Copy link
Copy Markdown
Member

What

Add a CI step that downloads the time-skipping test server binary once, before the per-sample test loop.

Why

The temporal-test-server binary (used by TestWorkflowEnvironment.createTimeSkipping()) is fetched lazily on first use and cached in the system temp dir. Previously the cold download happened inside whichever sample first called createTimeSkipping()eager-workflow-start — racing Jest's default 5000ms beforeAll timeout and flaking on slower runners.

Original failing CI: https://github.com/temporalio/samples-typescript/actions/runs/28044826285/job/83020064550?pr=476 (test (windows-latest, 22) timed out in eager-workflow-start's beforeAll).

Six samples use time-skipping across a mix of runners (Jest at the 5s default, plus Mocha). Pre-downloading once, off any timed hook, fixes all of them uniformly: every sample then hits the cached binary. This mirrors the "pre-start the server before timed tests" pattern the Temporal SDK repos already use.

🤖 Generated with Claude Code

The time-skipping test server binary is fetched lazily on first use and
cached in the system temp dir. Previously the cold download happened
inside whichever sample first called TestWorkflowEnvironment.createTimeSkipping()
(eager-workflow-start), racing Jest's default 5000ms beforeAll timeout and
flaking on slower runners (e.g. windows-latest).

Trigger the download once in a dedicated step after install and before the
sample loop, so every sample hits the cached binary and the download is no
longer on the critical path of any timed test hook.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@brianstrauch brianstrauch requested a review from a team as a code owner June 23, 2026 18:57
@brianstrauch brianstrauch enabled auto-merge (squash) June 23, 2026 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant