Test-only speedup: Shave 2 mins off test runtime#1219
Merged
Conversation
…tCheckV2CheckpointCounts_ReturnsErrorForCorruptRef Entire-Checkpoint: f50ffa8e636d
Contributor
There was a problem hiding this comment.
Pull request overview
Removes t.Parallel() in two slow tests and adds t.Chdir(...) so that git subprocesses invoked by the code under test run inside the test's temp repo rather than the project checkout, eliminating expensive promisor remote fetches.
Changes:
- Replaces
t.Parallel()witht.Chdir(dir)inTestCheckV2CheckpointCounts_ReturnsErrorForCorruptRef. - Replaces
t.Parallel()witht.Chdir(repoRoot)inTestV2ReadSessionMetadata_FetchesMissingMetadataBlob.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| cmd/entire/cli/doctor_test.go | Drops parallelism, chdirs into the temp repo to avoid stray git calls hitting the real repo. |
| cmd/entire/cli/checkpoint/v2_read_test.go | Same treatment for the missing-metadata-blob fetch test. |
pfleidi
approved these changes
May 15, 2026
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.
https://entire.io/gh/entireio/cli/trails/382
Removes
t.Parallel()in two slow tests in favor oft.Chdir(...).For these two tests specifically, the working directory mattered because the code under test shells out to git without -C . The tests create temp repos, but without
t.Chdir(tempRepo), those fallback git calls run from the real project checkout, hit its partial-clone promisor remotes, and burned about a minute.Before:
After:
Before:
After:
Note
Low Risk
Test-only changes that adjust working-directory and parallelism; low functional risk but could slightly reduce overall test concurrency.
Overview
Speeds up two previously slow tests by removing
t.Parallel()and explicitlyt.Chdir(...)into the temp repo root so any shell-outs togitrun against the intended fixture repo.This avoids accidental interaction with the developer checkout (e.g., partial-clone promisor remotes) and keeps the tests focused on corrupt/missing-object scenarios (
TestV2ReadSessionMetadata_FetchesMissingMetadataBlobandTestCheckV2CheckpointCounts_ReturnsErrorForCorruptRef).Reviewed by Cursor Bugbot for commit d5b684d. Configure here.