Skip to content

Migration: Use TimeTravel in Unit Tests - #918

Open
bolshakov wants to merge 1 commit into
feature/use-redis-timefrom
feature/use-time-travel-helper-in-tests
Open

Migration: Use TimeTravel in Unit Tests#918
bolshakov wants to merge 1 commit into
feature/use-redis-timefrom
feature/use-time-travel-helper-in-tests

Conversation

@bolshakov

@bolshakov bolshakov commented Sep 1, 2026

Copy link
Copy Markdown
Owner

What changed:

  • All unit tests updated to use TimeTravel for metrics snapshots, state transitions, recovery timing
  • All assertions on timestamped values now use frozen time
  • Tests run 100% deterministically regardless of system clock

Part of: 3-phase refactoring (Phase 2/3)

@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown

Review price tag

🟢 36 effective lines — about 5–11 min (down from 44–111 min) of focused review (based on 200–500 lines/hour). This is within the range where reviewers find the most issues per line, and small changes usually receive feedback the fastest.

Spread across many files. This PR changes 10 files — more than about 9 in 10 PRs touch. Each extra file is another piece of context a reviewer has to load and hold at once.

Why these numbers?

These minutes are what careful defect-finding costs at 200–500 lines/hour — the rate review studies report, not how long a skim takes. "Effective lines" already exclude generated files and lockfiles. Treat the rates and the 200/400 thresholds as guardrails, not laws.

@github-actions github-actions Bot added the proquo: large ProQuo review price tier: large label Sep 1, 2026
@bolshakov
bolshakov force-pushed the feature/use-time-travel-helper-in-tests branch from 0773451 to eba1557 Compare September 1, 2026 20:30
@github-actions github-actions Bot added proquo: small ProQuo review price tier: small and removed proquo: large ProQuo review price tier: large labels Sep 1, 2026
@bolshakov bolshakov changed the title Use time travel helper in tests Use Stoplight::TimeTravel in specs Sep 1, 2026
@bolshakov
bolshakov force-pushed the feature/use-time-travel-helper-in-tests branch from eba1557 to 1c8fafa Compare September 2, 2026 07:45
@bolshakov
bolshakov force-pushed the feature/use-time-travel-helper-in-tests branch from 1df8687 to 7b96266 Compare September 2, 2026 08:50
@bolshakov
bolshakov force-pushed the feature/use-time-travel-helper-in-tests branch from 7b96266 to 1df8687 Compare September 2, 2026 09:10
@bolshakov
bolshakov force-pushed the feature/use-time-travel-helper-in-tests branch from 1df8687 to 5b4e165 Compare September 2, 2026 09:13
@bolshakov
bolshakov force-pushed the feature/use-time-travel-helper-in-tests branch from 5b4e165 to 1df8687 Compare September 2, 2026 09:51
@bolshakov
bolshakov force-pushed the feature/use-time-travel-helper-in-tests branch from 1df8687 to 6f43628 Compare September 2, 2026 10:10
@github-actions github-actions Bot added proquo: medium ProQuo review price tier: medium and removed proquo: small ProQuo review price tier: small labels Sep 2, 2026
@bolshakov
bolshakov force-pushed the feature/use-time-travel-helper-in-tests branch 2 times, most recently from fdb0781 to 9b21b43 Compare September 2, 2026 10:17
@github-actions github-actions Bot added proquo: small ProQuo review price tier: small and removed proquo: medium ProQuo review price tier: medium labels Sep 2, 2026
@bolshakov
bolshakov force-pushed the feature/use-time-travel-helper-in-tests branch from 9b21b43 to a547a41 Compare September 2, 2026 11:13
@bolshakov
bolshakov marked this pull request as ready for review September 2, 2026 11:13
@bolshakov bolshakov changed the title Use Stoplight::TimeTravel in specs Migration: Use TimeTravel in Unit Tests Sep 2, 2026
@bolshakov
bolshakov requested a review from Lokideos September 2, 2026 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

proquo: small ProQuo review price tier: small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant