feat(testing): add skip-time virtual clock#523
Open
yaythomas wants to merge 1 commit into
Open
Conversation
5c208f2 to
355edf1
Compare
346a870 to
2e9ba2b
Compare
9829546 to
71962f1
Compare
d2f04f2 to
c494657
Compare
zhongkechen
reviewed
Jul 9, 2026
71962f1 to
11103e3
Compare
c494657 to
c1b3e66
Compare
c1b3e66 to
c317391
Compare
Contributor
Author
|
rebased on main, no other change [edit:] ooh hang on CI failures 😕 , investigating |
zhongkechen
previously approved these changes
Jul 13, 2026
Contributor
|
seems |
c317391 to
907f424
Compare
- Add Clock protocol with RealClock and SkipClock implementations - SkipClock returns real time plus the accumulated skipped duration, so virtual time advances with real time between jumps and every read stays monotonic and distinct - One clock per runner, shared by the Executor, CheckpointProcessor, and all timestamp stamping, so history events form a single totally ordered clock domain - Drive wait and step-retry timers off the clock so modeled delays complete instantly under skip while history keeps modeled durations - Stamp operation, invocation, and execution start/end timestamps from the clock; reconstruct operations from event timestamps - Ban datetime.now via ruff TID251 outside clock.py so all time reads go through the clock - Default DurableFunctionTestRunner to skip_time=True; pass skip_time=False for real wall-clock timing - Remove the DURABLE_EXECUTION_TIME_SCALE env-var scaling
907f424 to
089c4b8
Compare
Contributor
Author
|
changed:
Verification: 1353 testing-package tests pass, full workspace run 2883 passed, the 4 previously failing callback tests pass locally and in CI, mypy clean (119 files), hatch fmt --check clean. 3.13 integration test failure failing only on test_otel_logger_example_spans_in_xray, which is known pre-existing OTel X-Ray flk. |
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.
Description of changes:
Issue #, if available:
closes #437
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.