Skip to content

Commit

Permalink
TestLockfileWriteConcurrent: stay below 8192 goroutines
Browse files Browse the repository at this point in the history
The Go race detector will kill the test if it tries to have more than
8192 goroutines active at once, so start 8,000 instead of 100,000.

Signed-off-by: Nalin Dahyabhai <[email protected]>
  • Loading branch information
nalind committed Mar 22, 2021
1 parent 306fcab commit 38df75c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/lockfile/lockfile_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ func TestLockfileWriteConcurrent(t *testing.T) {
var wg sync.WaitGroup
var highestMutex sync.Mutex
var counter, highest int64
for i := 0; i < 100000; i++ {
for i := 0; i < 8000; i++ {
wg.Add(1)
go func() {
l.Lock()
Expand Down

0 comments on commit 38df75c

Please sign in to comment.