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

Chia-Network / chia-blockchain / 24109340436

07 Apr 2026 11:26PM UTC coverage: 91.203% (-0.1%) from 91.341%
24109340436

push

github

web-flow
[ASB-128] Fix flaky test_server_http_ban by freezing time.time() (#20759)

Fix flaky test_server_http_ban by freezing time.time()

The test was intermittently failing with off-by-one errors because
insert_from_delta_file() captures a fresh int(time.time()) on each
call. When the wall clock advanced between the two sequential calls,
max(old_ignore_till, new_timestamp + ban) would pick the newer value,
breaking the strict == assertion.

Freeze time.time() via monkeypatch so both calls see the same
timestamp, making the max() computation deterministic. Also tighten
the first ban assertion from >= to == since the frozen clock
guarantees an exact value.

10490 of 11674 branches covered (89.86%)

Branch coverage included in aggregate %.

5 of 5 new or added lines in 1 file covered. (100.0%)

182 existing lines in 9 files now uncovered.

106644 of 116758 relevant lines covered (91.34%)

1.83 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

86.56
/chia/full_node/full_node_api.py


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc