The test computed recent_t = (truncated_to_top_of_hour now) - 30min, which is 30-90 min before real utc_now() depending on what minute the test runs at. The LiveView's `cutoff = utc_now() - 1h` then dropped recent_t whenever the real-time minute exceeded ~30, so the test failed half the time. Anchor recent_t at the top of the current hour — that's always within the 1-hour window regardless of minute. The test still exercises the "keep within last hour" path; just stops being clock-flaky. |
||
|---|---|---|
| .. | ||
| fixtures | ||
| microwaveprop | ||
| microwaveprop_web | ||
| mix/tasks | ||
| support | ||
| test_helper.exs | ||