commit | 5d2ddcd3f51c1ff7aa0a84604b1d8610a17a7933 | [log] [tgz] |
---|---|---|
author | Bryan C. Mills <bcmills@google.com> | Mon Mar 30 14:04:08 2020 -0400 |
committer | Bryan C. Mills <bcmills@google.com> | Tue Mar 31 17:59:03 2020 +0000 |
tree | ee5d94a3252af4b9503728f979a6d21dc9759627 | |
parent | 5db079d2e5f97952be288c28a3a0690a523efdce [diff] |
context: fix a flaky timeout in TestLayersTimeout In CL 223019, I reduced the short timeout in the testLayers helper to be even shorter than it was. That exposed a racy (time-dependent) select later in the function, which failed in one of the slower builders (android-386-emu). Also streamline the test to make it easier to test with a very high -count flag: - Run tests that sleep for shortDuration in parallel to reduce latency. - Use shorter durations in examples to reduce test running time. - Avoid mutating global state (in package math/rand) in testLayers. After this change (but not before it), 'go test -run=TestLayersTimeout -count=100000 context' passes on my workstation. Fixes #38161 Change-Id: Iaf4abe7ac308b2100d8828267cda9f4f8ae4be82 Reviewed-on: https://go-review.googlesource.com/c/go/+/226457 Reviewed-by: Ian Lance Taylor <iant@golang.org>
Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
Gopher image by Renee French, licensed under Creative Commons 3.0 Attributions license.
Our canonical Git repository is located at https://go.googlesource.com/go. There is a mirror of the repository at https://github.com/golang/go.
Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.
Official binary distributions are available at https://golang.org/dl/.
After downloading a binary release, visit https://golang.org/doc/install or load doc/install.html in your web browser for installation instructions.
If a binary distribution is not available for your combination of operating system and architecture, visit https://golang.org/doc/install/source or load doc/install-source.html in your web browser for source installation instructions.
Go is the work of thousands of contributors. We appreciate your help!
To contribute, please read the contribution guidelines: https://golang.org/doc/contribute.html
Note that the Go project uses the issue tracker for bug reports and proposals only. See https://golang.org/wiki/Questions for a list of places to ask questions about the Go language.