diff options
| author | Paul Buetow <paul@buetow.org> | 2026-04-02 21:54:05 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-04-02 21:54:05 +0300 |
| commit | d94fdaf92d7c66c012e819c73632be16f346b66f (patch) | |
| tree | c8e39c8c81ecceb589722ab7179ce2e1f82bbba2 /internal/batch | |
| parent | 29f634d3413924af3a9dd6f89983c29b5320fe66 (diff) | |
task 00p: add -race to default test task; add t.Parallel() to safe unit tests
- Enable -race flag on the default 'task test' command so race conditions
are caught by default, not only when running 'task test-race'
- Add t.Parallel() to all tests in internal/image/prompt_test.go (pure
function tests with no shared state)
- Add t.Parallel() to TestReadBatchFile and its subtests in batch package
(file I/O with t.TempDir(), no global state)
- Add t.Parallel() to TestValidateBulgarianText and its subtests in audio
package (pure string validation, no shared state)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'internal/batch')
| -rw-r--r-- | internal/batch/processor_test.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/internal/batch/processor_test.go b/internal/batch/processor_test.go index 8bc8079..4ec1739 100644 --- a/internal/batch/processor_test.go +++ b/internal/batch/processor_test.go @@ -10,6 +10,7 @@ import ( ) func TestReadBatchFile(t *testing.T) { + t.Parallel() tests := []struct { name string fileContent string @@ -136,6 +137,7 @@ func TestReadBatchFile(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { + t.Parallel() // Create temp file tmpDir := t.TempDir() tmpFile := filepath.Join(tmpDir, "test.txt") @@ -157,6 +159,7 @@ func TestReadBatchFile(t *testing.T) { } func TestReadBatchFile_FileNotFound(t *testing.T) { + t.Parallel() _, err := ReadBatchFile("/nonexistent/file.txt") if err == nil { t.Error("Expected error for non-existent file") |
