• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

supabase / realtime / 35648740430
92%

Build:
DEFAULT BRANCH: main
Ran 21 Sep 2026 08:10PM UTC
Jobs 1
Files 125
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

21 Sep 2026 08:04PM UTC coverage: 91.634% (-0.09%) from 91.726%
35648740430

push

github

web-flow
Use wait_for_it library in tests (#2238)

* Use wait_for_it package for tests

* Fixes and improvements based on Claude review

* test: use wait_for_it for ad-hoc polling and waiting

ddcd9cc7 swapped `assert eventually(...)` for `assert_eventually`, i.e. the
waiting that already looked like waiting. This goes after the rest: 14
hand-rolled polling helpers across 58 call sites, and 100+ of the 143 blocking
sleeps that sat between a trigger and an assertion.

The strategy, roughly in the order the decisions were made:

1. Classify each sleep by what FOLLOWS it, not by how long it is.

   - "sleep, then assert something happened" -> `assert_eventually`. The sleep
     was a guess at how long an async effect takes; the wait returns as soon as
     the effect lands and reports the last observed value on failure.
   - "sleep, then assert something did NOT happen" -> `assert_always`. This is
     the larger category, and the one the suite had no tool for: sampling an
     invariant once at the end of a window cannot catch a regression in the
     middle of it. Same wall clock, strictly stronger assertion. 18 sites.
   - "sleep, then read state that a message already ordered" -> delete the
     sleep. `:sys.get_state/1` queues behind the message under test, so it
     already observes the state after that clause has run.

2. Replace hand-rolled loops with the construct matching their shape, so the
   failure message comes for free.

   The `Enum.reduce_while` and recursive retry helpers returned nil on
   exhaustion, which surfaced later as a FunctionClauseError or MatchError
   naming neither the condition nor the last value seen. `case_wait`'s `else`
   clause matches the last value that was evaluated, so the flunk/raise can say
   what it actually got. `wait!`/`match_wait!` cover the ones that only needed
   a value out.

3. Preserve every wait budget; never shorten one.

   Each converted helper kept its original timeout (attempts x interval). The
   two... (continued)

3976 of 4339 relevant lines covered (91.63%)

5618.53 hits per line

Coverage Regressions

Lines Coverage ∆ File
48
85.85
0.0% lib/realtime_web/channels/realtime_channel.ex
3
88.14
-5.08% lib/realtime/monitoring/gen_rpc_metrics.ex
1
84.62
-3.85% lib/realtime/monitoring/distributed_metrics.ex
Jobs
ID Job ID Ran Files Coverage
1 35648740430.1 21 Sep 2026 08:10PM UTC 500
61.15
GitHub Action Run
Source Files on build 35648740430
  • Tree
  • List 125
  • Changed 100
  • Source Changed 1
  • Coverage Changed 100
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #35648740430
  • 6d58a03e on github
  • Prev Build on main (#35584349283)
  • Next Build on main (#35679752747)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc