Repository navigation
test: add -short test mode support - #1109
Conversation
|
This change is part of the following stack: Change managed by git-spice. |
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly improves the local development workflow by integrating Go's built-in Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
|
Documentation Updates 1 document(s) were updated by changes in this PR: Development Environment with MinIOView Changes@@ -138,8 +138,11 @@
eval "$(enable-postgres-tests)" # PostgreSQL only
eval "$(enable-mysql-tests)" # MySQL/MariaDB only
-# Run tests using nix develop --command
+# Run full test suite
nix develop --command go test -race ./...
+
+# Or run fast test suite (skips slow tests)
+nix develop --command go test -short -race ./...
# Disable integration tests when done
eval "$(disable-integration-tests)"
@@ -150,8 +153,14 @@
The recommended way to run tests is using `nix develop --command`, which works consistently in both the main working tree and in worktrees:
```sh
+# Full test suite (comprehensive testing)
nix develop --command go test -race ./...
+
+# Fast test suite (quick feedback during development)
+nix develop --command go test -short -race ./...
```
+
+Use `go test -short -race ./...` for faster local development runs. This skips slow tests (those taking longer than 500ms) and is useful for rapid iteration during development. The full test suite without `-short` runs all tests and should be used for comprehensive testing before submitting changes.
For interactive use, you can also enter the development shell with `nix develop` or use `direnv allow` if you have `direnv` installed.
|
There was a problem hiding this comment.
Code Review
This pull request introduces support for the testing.Short() flag in Go tests, allowing for faster local development runs by skipping long-running tests. The changes correctly apply t.Skip("skipping test in short mode") guards to identified slow tests across various pkg/cache and pkg/chunker test files. Additionally, new OpenSpec markdown files detail the context, goals, decisions, and tasks related to this feature. Overall, the implementation aligns well with the stated objective.
9c5b701 to
d5c5119
Compare
972304a to
85d4519
Compare
This adds testing.Short() guards to slow tests (>500ms) to enable fast local development runs with 'go test -short -race ./...'. The following tests are gated: - TestCDCChunker_Chunk_ErrorRace - TestGetNarInfoDistributedCoordination - TestGetNar_UploadOnly - TestIssue990_BackgroundJobContextCancellation - TestPrefetchPipelineOrdering, - TestProgressiveStreamingAborted - TestProgressiveStreamingWithPrefetch - TestPutNarInfo_DoesNotTriggerNARStreaming - TestRunCDCLazyRecovery - TestRunCDCLazyRecoveryNoStuckFiles - TestRunCDCLazyRecoveryWithFilesNewerThanCutoff - TestStoreNarWithCDCCleanupOnFailure
Co-Authored-By: Claude Opus 4.6 <[email protected]>
85d4519 to
5260965
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1109 +/- ##
=====================================
Coverage 5.04% 5.04%
=====================================
Files 6 6
Lines 436 436
=====================================
Hits 22 22
Misses 410 410
Partials 4 4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This adds testing.Short() guards to slow tests (>500ms) to enable fast
local development runs with 'go test -short -race ./...'. The following
tests are gated: