Skip to content

feat: time-skipping test support and delayed-callback scheduler#779

Open
xepozz wants to merge 1 commit into
masterfrom
feature/testing-fw-timeskip
Open

feat: time-skipping test support and delayed-callback scheduler#779
xepozz wants to merge 1 commit into
masterfrom
feature/testing-fw-timeskip

Conversation

@xepozz

@xepozz xepozz commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

What was changed

Time-skipping test support + a client-side delayed-callback scheduler.

  • TimeLockingInterceptor + TimeSkippingWorkflowTestCase: timer-only workflows and ActivityMocker now work under time-skipping (composer test:func-timeskip).
  • DelayedCallbackScheduler ($this->delayedCallbacks): fire signal/query/cancel at simulated-time offsets; signalAfter() / readyWhen().
  • Lock-counter ownership guard in WorkflowTestCase::tearDown (a leaked lock no longer poisons the suite); test-side address via TemporalServer::address().

Why?

Timer-driven workflows were untestable under time-skipping and ActivityMocker + long timers hit spurious activity timeouts.

Checklist

  1. Closes [Bug] WorkflowTestCase / TestService: time skipping starts locked by default, no auto-unlock around getResult() — timer-only workflows hang in tests #743
    closes [Bug] ActivityMocker is incompatible with time-skipping — virtual clock skips through start-to-close timeout before mocked response arrives #745
    closes [Feature Request] registerDelayedCallback for tests #529

  2. How was this tested:

New Unit/Functional/Functional-TimeSkipping suites, all green + a negative repro for #745.

  1. Any docs updates needed?

Yes — testing-suite page on docs.temporal.io.

@xepozz
xepozz requested review from a team, roxblnfk and wolfy-j as code owners July 21, 2026 06:14
@xepozz
xepozz force-pushed the feature/testing-fw-timeskip branch from 586c7c5 to 814a763 Compare July 21, 2026 06:15
- TimeLockingInterceptor + TimeSkippingWorkflowTestCase: timer-only workflows and
  ActivityMocker now work under time-skipping (composer test:func-timeskip). Closes #743, #745.
- DelayedCallbackScheduler ($this->delayedCallbacks): fire signal/query/cancel at
  simulated-time offsets; signalAfter() / readyWhen(). Addresses #529.
- Lock-counter ownership guard in WorkflowTestCase::tearDown; test-side address via
  TemporalServer::address().
@xepozz
xepozz force-pushed the feature/testing-fw-timeskip branch from 814a763 to a557c2e Compare July 21, 2026 06:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant