Skip to content

test(precompute): add a wall-clock override hook to PrecomputeEngine - #537

Merged
milindsrivastava1997 merged 1 commit into
mainfrom
474-precompute-wall-clock-e2e-test-hook
Aug 18, 2026
Merged

test(precompute): add a wall-clock override hook to PrecomputeEngine#537
milindsrivastava1997 merged 1 commit into
mainfrom
474-precompute-wall-clock-e2e-test-hook

Conversation

@milindsrivastava1997

@milindsrivastava1997 milindsrivastava1997 commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Stacked on fix(precompute): keep wall-clock fallback from force-closing panes still under active ingest #536. Test-support infrastructure only, no behavior change.
  • Worker already has a fake-clock override (set_now_ms_fn) for its own unit tests, but it was #[cfg(test)]-gated and invisible to integration tests under tests/. Moved this to pub(crate) so that it is no longer test-cfg-gated
  • Lets an integration test drive the wall-clock fallback deterministically through the real ingest pipeline instead of racing a real clock with sleeps. Not consumed by anything yet — used in Remove old repo name from codebase #3.
  • The override defaults to None; every worker keeps its default SystemTime::now-backed clock unless a caller opts in. Production code never calls with_now_ms_fn.

Base automatically changed from 474-fixprecompute-bulk-single-timestamp-ingest-silently-drops-rows-when-wall-clock-fallback-closes-the-window-mid-ingest-1 to main August 18, 2026 18:12
Stacked on the #474 fix. Worker already has a fake-clock override
(set_now_ms_fn) for its own unit tests, but it's #[cfg(test)]-gated and
invisible to integration tests under tests/, which link the library
normally. Widen it to pub(crate) and add PrecomputeEngine::with_now_ms_fn,
a builder that threads a shared clock override down to every spawned
worker, so an integration test can drive the wall-clock fallback
deterministically through the real ingest pipeline instead of racing a
real clock with sleeps.

No behavioral change: the override defaults to None and every worker keeps
its default SystemTime::now-backed clock unless a caller opts in.
Production code never calls with_now_ms_fn.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@milindsrivastava1997
milindsrivastava1997 force-pushed the 474-precompute-wall-clock-e2e-test-hook branch from f8217eb to 9e0c251 Compare August 18, 2026 18:12
@milindsrivastava1997
milindsrivastava1997 merged commit b1a4ab0 into main Aug 18, 2026
5 checks passed
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.

2 participants