-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update .gitignore, add data racing validation test
- Loading branch information
Showing
6 changed files
with
194 additions
and
80 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,3 +14,5 @@ | |
# Dependency directories (remove the comment below to include it) | ||
# vendor/ | ||
dist/ | ||
|
||
.vscode/ |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// CODE GENERATED AUTOMATICALLY WITH github.com/kelveny/mockcompose | ||
// THIS FILE SHOULD NOT BE EDITED BY HAND | ||
package race | ||
|
||
import ( | ||
"fmt" | ||
"sync" | ||
|
||
"github.com/stretchr/testify/mock" | ||
) | ||
|
||
type raceMock struct { | ||
race | ||
mock.Mock | ||
} | ||
|
||
func (m *raceMock) WorkRun(wg *sync.WaitGroup) { | ||
|
||
m.Called(wg) | ||
|
||
} | ||
|
||
func (r *raceMock) RaceRun(runners int) { | ||
wg := sync.WaitGroup{} | ||
wg.Add(runners) | ||
for i := 0; i < runners; i++ { | ||
fmt.Printf("raceRun start runner %d\n", i) | ||
go r.WorkRun(&wg) | ||
} | ||
wg.Wait() | ||
fmt.Printf("raceRun done\n") | ||
} |
Oops, something went wrong.