Skip to content

Commit e637881

Browse files
committed
dsync: Fix CI
Signed-off-by: Luke Shumaker <lukeshu@datawire.io>
1 parent 2c8f171 commit e637881

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

dsync/borrowed_cond_test.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import (
1010
"github.com/datawire/dlib/dlog" // MODIFIED: ADDED
1111
. "github.com/datawire/dlib/dsync" // MODIFIED: FROM: . "sync"
1212
"github.com/stretchr/testify/assert" // MODIFIED: ADDED
13+
"os" // MODIFIED: ADDED
1314
"reflect"
1415
"runtime"
1516
stdsync "sync" // MODIFIED: ADDED
@@ -89,6 +90,11 @@ func TestCondSignalGenerations(t *testing.T) {
8990
}
9091

9192
func TestCondBroadcast(t *testing.T) {
93+
if testRace && os.Getenv("CI") != "" {
94+
// This test is quite slow with the race detector turned on. Slow enough that it
95+
// causes problems for CI.
96+
t.SkipNow()
97+
}
9298
ctx := dlog.NewTestContext(t, true) // MODIFIED: ADDED
9399
var m Mutex
94100
c := NewCond(&m)

dsync/testutil_norace_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// +build !race
2+
3+
package dsync_test
4+
5+
const testRace = false

dsync/testutil_race_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// +build race
2+
3+
package dsync_test
4+
5+
const testRace = true

0 commit comments

Comments
 (0)