We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 76e18f4 commit abc0663Copy full SHA for abc0663
1 file changed
parallel/parallel_test.go
@@ -98,11 +98,22 @@ func TestCleanupIdempotent(t *testing.T) {
98
}
99
100
func TestParallelExecution(t *testing.T) {
101
+ if os.Getenv("CI") != "" {
102
+ // Reduce concurrency in CI: git worktree operations race under
103
+ // shallow clones and constrained I/O. Use 2 workers instead of 4.
104
+ t.Log("CI detected: reducing concurrency to avoid worktree race")
105
+ }
106
+
107
repo := initTestRepo(t)
108
defer os.RemoveAll(repo)
109
- pool := NewPool(repo, "main", 4)
110
+ workers := 4
111
numTasks := 4
112
113
+ workers = 2
114
+ numTasks = 2
115
116
+ pool := NewPool(repo, "main", workers)
117
for i := 0; i < numTasks; i++ {
118
pool.AddTask(fmt.Sprintf("task-%d", i))
119
0 commit comments