Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Run tests with race flag #437

Merged
merged 17 commits into from
Jul 31, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Try to fix file's tests for the CI runner
  • Loading branch information
vadimalekseev committed Jul 31, 2023
commit 05d051cd1c3b299e5ac9ae8e283c834476874568
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
GOARCH: ${{ matrix.arch }}
GOFLAGS: ${{ matrix.flags }}
LOG_LEVEL: error
run: go test -coverprofile=profile.out -covermode=atomic -coverpkg=./... ./...
run: go test -coverprofile=profile.out -covermode=atomic -v -coverpkg=./... ./...

- name: Upload artifact
uses: actions/upload-artifact@v3
Expand Down
5 changes: 1 addition & 4 deletions plugin/input/file/file_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,6 @@ func renameFile(oldFile string, newFile string) {
}

func closeFile(f *os.File) {
if err := f.Sync(); err != nil {
panic(err)
}

if err := f.Close(); err != nil {
panic(err.Error())
}
Expand Down Expand Up @@ -805,6 +801,7 @@ func TestReadManyPreparedFilesRace(t *testing.T) {
if testing.Short() {
t.Skip("skip long tests in short mode")
}

lineCount := 2
blockCount := 128 * 128
fileCount := 32
Expand Down
2 changes: 1 addition & 1 deletion test/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func startCasePipeline(act func(pipeline *pipeline.Pipeline), out func(event *pi
if x.Load() <= 0 {
break
}
if time.Since(t) > time.Second*20 {
if time.Since(t) > time.Minute*2 {
panic("too long act")
}
}
Expand Down