Deflake #joinable? join-window specs - #2092
Open
maebeale wants to merge 1 commit into
Open
Conversation
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>
maebeale
marked this pull request as ready for review
August 4, 2026 13:14
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.
🤖 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?
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_timeacross the#joinable?describe so those boundary cases are deterministic instead of clock-dependent.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?
event_registration_spec.rb142/142 green; RuboCop clean.