ci: pre-download time-skipping test server before test loop#482
Open
brianstrauch wants to merge 1 commit into
Open
ci: pre-download time-skipping test server before test loop#482brianstrauch wants to merge 1 commit into
brianstrauch wants to merge 1 commit into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Add a CI step that downloads the time-skipping test server binary once, before the per-sample test loop.
Why
The
temporal-test-serverbinary (used byTestWorkflowEnvironment.createTimeSkipping()) is fetched lazily on first use and cached in the system temp dir. Previously the cold download happened inside whichever sample first calledcreateTimeSkipping()—eager-workflow-start— racing Jest's default 5000msbeforeAlltimeout 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 ineager-workflow-start'sbeforeAll).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