test(fonts): serialise the tests that read the shared font generation - #447
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
FONT_GENERATIONis one global counter and cargo runs tests in parallel, so atest 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_cachefailed thatway 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.