Skip to content

Commit

Permalink
Sleep not necessary: race detector consistently detects race without …
Browse files Browse the repository at this point in the history
…it (#104)
  • Loading branch information
jhump authored Mar 2, 2023
1 parent 5340254 commit fa737f6
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions compiler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import (
"os"
"strings"
"testing"
"time"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
Expand Down Expand Up @@ -370,10 +369,6 @@ func TestDataRace(t *testing.T) {
return err
})
grp.Go(func() error {
// We need to start this *after* the one above, but we can't
// use any sychronizing event or that would not be a race.
// So we assume a one second delay is sufficient.
time.Sleep(time.Second)
_, err := compiler2.Compile(ctx, "desc_test_complex.proto")
return err
})
Expand Down

0 comments on commit fa737f6

Please sign in to comment.