aboutsummaryrefslogtreecommitdiff
path: root/src/testing
diff options
context:
space:
mode:
authorMarcel van Lohuizen <mpvl@golang.org>2016-04-14 15:44:48 +0800
committerBrad Fitzpatrick <bradfitz@golang.org>2016-04-14 14:00:43 +0000
commit0ec6d7c0bbfceb7b8e4857b775686ae5cf699e54 (patch)
tree359b2a75d94a5290ffd8576f72d0e5e24ef3811f /src/testing
parent285e78609f4fd85948d056f581d3443d5f9b230a (diff)
downloadgo-0ec6d7c0bbfceb7b8e4857b775686ae5cf699e54.tar.xz
testing: removed flakey test
The synchronization in this test is a bit complicated and likely incorrect, judging from the sporadically hanging trybots. Most of what this is supposed to test is already tested in TestTestContext, so I'll just remove it. Fixes #15170 Change-Id: If54db977503caa109cec4516974eda9191051888 Reviewed-on: https://go-review.googlesource.com/22080 Run-TryBot: Marcel van Lohuizen <mpvl@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/testing')
-rw-r--r--src/testing/sub_test.go51
1 files changed, 0 insertions, 51 deletions
diff --git a/src/testing/sub_test.go b/src/testing/sub_test.go
index 4f26a53ab6..2804550737 100644
--- a/src/testing/sub_test.go
+++ b/src/testing/sub_test.go
@@ -227,57 +227,6 @@ func TestTRun(t *T) {
}
},
}, {
- desc: "run no more than *parallel tests concurrently",
- ok: true,
- maxPar: 4,
- f: func(t *T) {
- max := 0
- in := make(chan int)
- out := make(chan int)
- ctx := t.context
- t.Run("wait", func(t *T) {
- t.Run("controller", func(t *T) {
- // Verify sequential tests don't skew counts.
- t.Run("seq1", func(t *T) {})
- t.Run("seq2", func(t *T) {})
- t.Run("seq3", func(t *T) {})
- t.Parallel()
- for i := 0; i < 80; i++ {
- ctx.mu.Lock()
- if ctx.running > max {
- max = ctx.running
- }
- ctx.mu.Unlock()
- <-in
- // force a minimum to avoid a race, although it works
- // without it.
- if i >= ctx.maxParallel-2 { // max - this - 1
- out <- i
- }
- }
- close(out)
- })
- // Ensure we don't exceed the maximum even with nested parallelism.
- for i := 0; i < 2; i++ {
- t.Run("", func(t *T) {
- t.Parallel()
- for j := 0; j < 40; j++ {
- t.Run("", func(t *T) {
- t.Run("seq1", func(t *T) {})
- t.Run("seq2", func(t *T) {})
- t.Parallel()
- in <- j
- <-out
- })
- }
- })
- }
- })
- if max != ctx.maxParallel {
- realTest.Errorf("max: got %d; want: %d", max, ctx.maxParallel)
- }
- },
- }, {
desc: "alternate sequential and parallel",
// Sequential tests should partake in the counting of running threads.
// Otherwise, if one runs parallel subtests in sequential tests that are