Skip to content

test: verify server honors delay-start on continue-as-new#10435

Open
yiminc wants to merge 1 commit into
mainfrom
test/continue-as-new-delay-start
Open

test: verify server honors delay-start on continue-as-new#10435
yiminc wants to merge 1 commit into
mainfrom
test/continue-as-new-delay-start

Conversation

@yiminc
Copy link
Copy Markdown
Member

@yiminc yiminc commented May 29, 2026

What changed

Adds a functional test (TestContinueAsNewWithDelayStart) covering continue-as-new with a delayed start.

The SDKs do not yet expose a delay-start option on the continue-as-new command, so the test sets BackoffStartInterval directly on the raw ContinueAsNewWorkflowExecutionCommandAttributes, which the task poller sends over gRPC verbatim. This simulates an SDK that supports the flag.

What it verifies

  • The original run's WorkflowExecutionContinuedAsNew event records the requested BackoffStartInterval.
  • The new run's WorkflowExecutionStarted event carries the corresponding FirstWorkflowTaskBackoff.
  • The new run's first workflow task is deferred: the poller long-polls and only receives the task once the backoff timer fires, then the run completes.
  • The WorkflowTaskScheduled event timestamp is at least the requested delay after the WorkflowExecutionStarted event (deterministic, event-timestamp based).

WorkflowIdReuseMinimalInterval is overridden to 0 so the observed backoff is attributable solely to the requested delay.

Testing

go test ./tests/ -run 'TestContinueAsNewTestSuite/TestContinueAsNewWithDelayStart' passes.

@yiminc yiminc marked this pull request as ready for review May 29, 2026 23:21
@yiminc yiminc requested review from a team as code owners May 29, 2026 23:21
@yiminc yiminc changed the title [WIP,DO_NOT_REVIEW] test: verify server honors delay-start on continue-as-new test: verify server honors delay-start on continue-as-new May 29, 2026
Add a functional test that sends a continue-as-new command with
BackoffStartInterval set directly on the raw gRPC command (the SDKs do
not yet expose a delay-start option). Verifies the new run's first
workflow task is deferred by the requested interval before running to
completion.
@yiminc yiminc force-pushed the test/continue-as-new-delay-start branch from 27f8573 to 7c62169 Compare May 29, 2026 23:29
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.

3 participants