Skip to content

tests: fix flaky fetcher, catchpoint, expect tests#6546

Merged
algorandskiy merged 5 commits intoalgorand:masterfrom
algorandskiy:pavel/test-fixes-0203
Mar 2, 2026
Merged

tests: fix flaky fetcher, catchpoint, expect tests#6546
algorandskiy merged 5 commits intoalgorand:masterfrom
algorandskiy:pavel/test-fixes-0203

Conversation

@algorandskiy
Copy link
Copy Markdown
Contributor

@algorandskiy algorandskiy commented Feb 3, 2026

Summary

  1. Fix a race condition in TestRequestBlockBytesErrors as seen here. Caused by a specific assert when running block fetching on pre-cancelled context. In this case Request races with async Respond so both response channel and context.Done are ready. Fixed by adding context cancellation pre-check in the function prologue.
  2. Fixed GLOBAL_TEST_ALGO_DIR clearing in expect tests causing error like this.
  3. Fixed catchpoint content mismatch in TestCatchpointAfterTxns by forcing trackers to flush before creating catchpoints.
  4. Fixed a race in double ledger content verification in TestExactAccountChunk as seen in this master branch build failure

Test Plan

Flaky test fixes

@algorandskiy algorandskiy self-assigned this Feb 3, 2026
@algorandskiy algorandskiy changed the title tests: fix flaky tests: fix flaky fetcher, catchpoint, expect tests Feb 3, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Feb 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 47.76%. Comparing base (c80fa40) to head (68ebf79).
⚠️ Report is 15 commits behind head on master.
✅ All tests successful. No failed tests found.

❗ There is a different number of reports uploaded between BASE (c80fa40) and HEAD (68ebf79). Click for more details.

HEAD has 5 uploads less than BASE
Flag BASE (c80fa40) HEAD (68ebf79)
full_coverage 5 0
Additional details and impacted files
@@             Coverage Diff             @@
##           master    #6546       +/-   ##
===========================================
- Coverage   61.89%   47.76%   -14.14%     
===========================================
  Files         484      645      +161     
  Lines       67571    87846    +20275     
===========================================
+ Hits        41822    41957      +135     
- Misses      22184    43131    +20947     
+ Partials     3565     2758      -807     
Flag Coverage Δ
full_coverage ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

gmalouf
gmalouf previously approved these changes Feb 6, 2026
@algorandskiy algorandskiy merged commit 8d84b18 into algorand:master Mar 2, 2026
40 checks passed
@algorandskiy algorandskiy deleted the pavel/test-fixes-0203 branch March 16, 2026 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants