Skip to content

Commit

Permalink
Tweaked timings for race detector
Browse files Browse the repository at this point in the history
  • Loading branch information
destel committed Mar 26, 2024
1 parent 8bbc0ac commit 1f3c2a0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions core_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ func TestForEach(t *testing.T) {
t.Errorf("early exit did not happen")
}

time.Sleep(1 * time.Second)
time.Sleep(2 * time.Second)
th.ExpectDrainedChan(t, in)
})
})
Expand All @@ -379,7 +379,7 @@ func TestForEach(t *testing.T) {
}

// wait until it drained
time.Sleep(1 * time.Second)
time.Sleep(2 * time.Second)
th.ExpectDrainedChan(t, in)
})
})
Expand Down
2 changes: 1 addition & 1 deletion internal/core/loops_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ func TestBreakable(t *testing.T) {
for x := range in1 {
if x == 100 {
earlyExit()
time.Sleep(1 * time.Second) // give Break some time to react and drain
time.Sleep(2 * time.Second) // give Break some time to react and drain
}

if x > maxSeen {
Expand Down
2 changes: 1 addition & 1 deletion wrap_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func TestFromSlice(t *testing.T) {
th.ExpectSlice(t, outSlice, inSlice[:15])
th.ExpectError(t, err, "err15")

time.Sleep(1 * time.Second)
time.Sleep(2 * time.Second)
th.ExpectDrainedChan(t, in)
})
}
Expand Down

0 comments on commit 1f3c2a0

Please sign in to comment.