Skip to content

Commit 3b5eec9

Browse files
committed
runtime/race: be less picky about test run time
Currently, there are two regexps in the race detector output tests that assume subtests will complete in < 1 second. This isn't necessary and very occasionally fails (on builders that are probably very loaded). Make these tests less picky about timing. Fixes #50612. Change-Id: Ib3f94d6c5dc37541dbeb06de71cf462a74af844b Reviewed-on: https://go-review.googlesource.com/c/go/+/378581 Trust: Austin Clements <[email protected]> Run-TryBot: Austin Clements <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> TryBot-Result: Gopher Robot <[email protected]>
1 parent a99c38d commit 3b5eec9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/runtime/race/output_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ func TestFail(t *testing.T) {
207207
}
208208
`, []string{`
209209
==================
210-
--- FAIL: TestFail \(0...s\)
210+
--- FAIL: TestFail \([0-9.]+s\)
211211
.*main_test.go:14: true
212212
.*testing.go:.*: race detected during execution of test
213213
FAIL`}},
@@ -363,7 +363,7 @@ func TestPass(t *testing.T) {
363363
}
364364
`, []string{`
365365
==================
366-
--- FAIL: TestFail \(0...s\)
366+
--- FAIL: TestFail \([0-9.]+s\)
367367
.*testing.go:.*: race detected during execution of test
368368
FAIL`}},
369369
{"mutex", "run", "", "atexit_sleep_ms=0", `

0 commit comments

Comments
 (0)