Skip to content

test(fonts): serialise the tests that read the shared font generation - #447

Merged
LeadcodeDev merged 1 commit into
mainfrom
fix/font-generation-test-race
Sep 29, 2026
Merged

LeadcodeDev merged 1 commit into
mainfrom
fix/font-generation-test-race

Conversation

@LeadcodeDev

Copy link
Copy Markdown
Owner

FONT_GENERATION is one global counter and cargo runs tests in parallel, so a
test that reads it, calls something, and reads it again can have a sibling bump it
in between.

loading_an_empty_font_list_does_not_throw_away_every_threads_cache failed that
way on a full-workspace run while every scoped run of the same module stayed
green — which is exactly what makes a flake look like someone else's regression.
It surfaced during this batch, where several workstreams were running scoped
suites and only the integration run was full.

The five tests that read or move the counter now take one mutex. Six consecutive
full runs of the crate pass, where roughly one in a handful failed before.

My own defect, introduced with the counter in #416. Refs #438.

FONT_GENERATION is one global counter and cargo runs tests in parallel,
so a test reading it, calling something, and reading it again could have
a sibling bump it in between. loading_an_empty_font_list_does_not_throw_
away_every_threads_cache failed that way on a full-workspace run while
every scoped run of the same module stayed green, which is what made it
look like someone else's regression.

The five tests that read or move the counter now take one mutex. Six
consecutive full runs of the crate pass where one in a handful failed
before.

My own defect, introduced with the counter in #416.
@LeadcodeDev LeadcodeDev added the bug Something isn't working label Sep 29, 2026
@LeadcodeDev LeadcodeDev self-assigned this Sep 29, 2026
@LeadcodeDev
LeadcodeDev merged commit 7568642 into main Sep 29, 2026
4 checks passed
@LeadcodeDev
LeadcodeDev deleted the fix/font-generation-test-race branch September 29, 2026 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant