Skip to content

test(reservation): stabilize full-series recurrence test#1090

Merged
JohnVillalovos merged 1 commit intodevelopfrom
jlvillal/dst_error
Feb 28, 2026
Merged

test(reservation): stabilize full-series recurrence test#1090
JohnVillalovos merged 1 commit intodevelopfrom
jlvillal/dst_error

Conversation

@JohnVillalovos
Copy link
Collaborator

A test failure occurred at certains times when DST would start in the next 10 days.

Freeze the current time in
ExistingReservationTest::testWhenApplyingRecurrenceUpdatesToFullSeries and derive the test date from a safe midday anchor.

This test was using live Date::Now() values, which made the recurrence window sensitive to timezone conversion into the booked-by user's timezone (America/New_York). When the generated 10-day recurrence range crossed a DST boundary or was evaluated near midnight UTC, the local termination date could shift and produce off-by-one instance counts.

A test failure occurred at certains times when DST would start in the
next 10 days.

Freeze the current time in
ExistingReservationTest::testWhenApplyingRecurrenceUpdatesToFullSeries
and derive the test date from a safe midday anchor.

This test was using live Date::Now() values, which made the recurrence
window sensitive to timezone conversion into the booked-by user's
timezone (America/New_York). When the generated 10-day recurrence range
crossed a DST boundary or was evaluated near midnight UTC, the local
termination date could shift and produce off-by-one instance counts.
Copilot AI review requested due to automatic review settings February 28, 2026 05:11
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Stabilizes a flaky reservation recurrence test by removing dependence on the actual current time, which could shift across DST/timezone boundaries and cause off-by-one instance counts.

Changes:

  • Freezes Date::Now() to a fixed midday timestamp for determinism.
  • Derives the test’s “today” anchor from TestBase::GetTestDate() (safe mid-day date) instead of live Date::Now().

@JohnVillalovos JohnVillalovos merged commit ede46c2 into develop Feb 28, 2026
19 checks passed
@JohnVillalovos JohnVillalovos deleted the jlvillal/dst_error branch February 28, 2026 05:20
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