Skip to content

Deflake #joinable? join-window specs - #2092

Open
maebeale wants to merge 1 commit into
mainfrom
maebeale/commit-push-pr-v1
Open

Deflake #joinable? join-window specs#2092
maebeale wants to merge 1 commit into
mainfrom
maebeale/commit-push-pr-v1

Conversation

@maebeale

@maebeale maebeale commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

🤖 suggested review level: 3 Read 📖 test-only: freezes the clock in a describe block + a global travel_back safety net, no product code

What is the goal of this PR and why is this important?

  • The EventRegistration#joinable? join-window boundary examples place events exactly 1 minute inside the 30-minute join buffer, so they raced wall-clock drift and could spike under CI load.

How did you approach the change?

  • freeze_time across the #joinable? describe so those boundary cases are deterministic instead of clock-dependent.
  • Added a global config.after { travel_back } — RSpec never runs minitest teardown, so a frozen clock would otherwise leak into later specs. No-op today; required now that a spec freezes time.

Anything else to add?

  • Test-only. event_registration_spec.rb 142/142 green; RuboCop clean.

The join-window boundary examples place events exactly 1 minute inside
the 30-minute buffer, so they depended on wall-clock drift between
factory-build and assertion staying under a minute — thin enough to
spike under CI load. Freeze the clock across the describe so they're
deterministic. Also add a global travel_back after each example:
RSpec never runs minitest teardown, so a frozen clock would otherwise
leak into later specs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings August 4, 2026 13:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@maebeale
maebeale marked this pull request as ready for review August 4, 2026 13:14
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