Skip to content

fix(test): flaky failure in "insertion out of order" test#1334

Merged
dnut merged 1 commit intomainfrom
prestonsn/fix-accountsdb-flaky-insert-ooorder
Mar 24, 2026
Merged

fix(test): flaky failure in "insertion out of order" test#1334
dnut merged 1 commit intomainfrom
prestonsn/fix-accountsdb-flaky-insert-ooorder

Conversation

@prestonsn
Copy link
Copy Markdown
Contributor

@prestonsn prestonsn commented Mar 20, 2026

Had this come up when running unit tests.

The test roots a randomly-picked slot, then expects writes to slot 1 to be rejected. When slot 0 was picked (due to random sampling in unit test), largest_rooted_slot = 0 correctly allows writes to slot 1, failing the assertion. The fix excludes slot 0 from the random range.

Slot 0 could be randomly picked for rooting, which is too low to
block writes to slot 1, causing a ~1/101 spurious failure.
@github-project-automation github-project-automation Bot moved this to 🏗 In progress in Sig Mar 20, 2026
@prestonsn prestonsn self-assigned this Mar 20, 2026
@prestonsn prestonsn marked this pull request as ready for review March 20, 2026 17:12
@prestonsn prestonsn requested review from dnut, ultd and yewman as code owners March 20, 2026 17:12
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
src/accountsdb/account_store.zig 94.25% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-project-automation github-project-automation Bot moved this from 🏗 In progress to 👀 In review in Sig Mar 23, 2026
@dnut dnut added this pull request to the merge queue Mar 23, 2026
Merged via the queue into main with commit ed902e3 Mar 24, 2026
13 checks passed
@dnut dnut deleted the prestonsn/fix-accountsdb-flaky-insert-ooorder branch March 24, 2026 00:25
@github-project-automation github-project-automation Bot moved this from 👀 In review to ✅ Done in Sig Mar 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants