Give each test process its own fixture extraction - #115
Merged
Merged
Conversation
The unzipped fixtures were cached in one clean_repository directory shared by every test run on the machine, so concurrent runs from different checkouts collided, and a run reused whatever fixtures.zip another branch had extracted before it. - Unzip into clean_repository-<unique id> once per test process, the same no-shared-state approach GitX's own tests use for temp folders. - Remove that directory when the process exits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Give each test process its own copy of the unzipped fixtures, so concurrent test runs can't collide and no run reuses fixtures extracted from another branch's
fixtures.zip.$TMPDIR/com.libgit2.objectivegit/clean_repositorycache with aclean_repository-<unique id>directory created once per test process (about 1.5 s to unzip).tearDown).Setting
TMPDIR/TEST_RUNNER_TMPDIRis not an alternative:NSTemporaryDirectory()ignoresTMPDIRon current macOS.Test plan
Libgit2FeaturesSpecx3,GTSubmoduleSpecsync URL), same as master after Fix the test fixtures failing to unzip #113.GTRepositorySpectwice at the same time while sampling the temp root: two distinctclean_repository-*directories existed at the same time, both removed after exit, and the old sharedclean_repositorywas left untouched.🤖 Generated with Claude Code