]> Cypherpunks repositories - gostls13.git/commit
runtime/race: make test more robust
authorDmitry Vyukov <dvyukov@google.com>
Thu, 7 May 2015 09:33:45 +0000 (12:33 +0300)
committerDmitry Vyukov <dvyukov@google.com>
Wed, 24 Jun 2015 17:53:25 +0000 (17:53 +0000)
commit77082481d48c8cd8ea93328f9ab962092fe0183f
treec736ed0222ca8d211968cb26578f2d6e6ba8897d
parent703166ea14e510a4aee805f956475570130f2df2
runtime/race: make test more robust

The test is flaky on builders lately. I don't see any issues other than
usage of very small sleeps. So increase the sleeps. Also take opportunity
to refactor the code.
On my machine this change significantly reduces failure rate with GOMAXPROCS=2.
I can't reproduce the failure with GOMAXPROCS=1.

Fixes #10726

Change-Id: Iea6f10cf3ce1be5c112a2375d51c13687a8ab4c9
Reviewed-on: https://go-review.googlesource.com/9803
Reviewed-by: Austin Clements <austin@google.com>
src/runtime/race/testdata/sync_test.go