diff options
| author | Marcel van Lohuizen <mpvl@golang.org> | 2016-03-18 14:05:54 +0100 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2016-03-18 16:24:27 +0000 |
| commit | 2d4c3d2489010527fad20693fc6e162f342a1d0a (patch) | |
| tree | 27b3827de202958e143f1b254c49d0bc8f5949d6 /src/testing | |
| parent | f39d6d961383ab0325ad1ca32372b82e0e667863 (diff) | |
| download | go-2d4c3d2489010527fad20693fc6e162f342a1d0a.tar.xz | |
testing: disable tests that cause a hang on some platforms
plan9, nacl, and netbsd to be precise.
Only the first test causes a hang, but just to be sure.
Change-Id: I400bb356ee2a0cf12c8666c95af79c924d1629aa
Reviewed-on: https://go-review.googlesource.com/20839
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
Diffstat (limited to 'src/testing')
| -rw-r--r-- | src/testing/sub_test.go | 54 |
1 files changed, 1 insertions, 53 deletions
diff --git a/src/testing/sub_test.go b/src/testing/sub_test.go index f9c3f4176a..6455540498 100644 --- a/src/testing/sub_test.go +++ b/src/testing/sub_test.go @@ -179,57 +179,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 @@ -249,7 +198,7 @@ func TestTRun(t *T) { }) }, }, { - desc: "alternate sequential and parallel", + desc: "alternate sequential and parallel 2", // Sequential tests should partake in the counting of running threads. // Otherwise, if one runs parallel subtests in sequential tests that are // itself subtests of parallel tests, the counts can get askew. @@ -298,7 +247,6 @@ func TestTRun(t *T) { t.Run("d4", func(t *T) {}) }) } - }) } }) |
