]> Cypherpunks repositories - gostls13.git/commitdiff
archive/zip: skip large concurrent tests in race mode
authorBrad Fitzpatrick <bradfitz@golang.org>
Mon, 21 Nov 2016 19:09:42 +0000 (19:09 +0000)
committerBrad Fitzpatrick <bradfitz@golang.org>
Mon, 21 Nov 2016 20:51:42 +0000 (20:51 +0000)
We recently added these large zip64 tests. They're slow-ish already,
but fast enough in non-race mode with t.Parallel. But in race mode,
the concurrency makes them much slower than the normal
non-race-to-race multiplier.

They're taking so long now that it's causing test failures when it
sometimes is over the test timeout threshold.

Change-Id: I02f4ceaa9d6cab826708eb3860f47a57b05bdfee
Reviewed-on: https://go-review.googlesource.com/33423
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/archive/zip/zip_test.go

index e1e67e535703db415f75455f5df95aa4fbcc157b..8801e904130ae10c70c158f5ade2dc11d87db3d0 100644 (file)
@@ -11,6 +11,7 @@ import (
        "errors"
        "fmt"
        "hash"
+       "internal/race"
        "internal/testenv"
        "io"
        "io/ioutil"
@@ -296,6 +297,9 @@ func TestZip64EdgeCase(t *testing.T) {
 // Tests that we generate a zip64 file if the the directory at offset
 // 0xFFFFFFFF, but not before.
 func TestZip64DirectoryOffset(t *testing.T) {
+       if testing.Short() && race.Enabled {
+               t.Skip("skipping in short mode")
+       }
        t.Parallel()
        const filename = "huge.txt"
        gen := func(wantOff uint64) func(*Writer) {
@@ -338,6 +342,9 @@ func TestZip64DirectoryOffset(t *testing.T) {
 
 // At 16k records, we need to generate a zip64 file.
 func TestZip64ManyRecords(t *testing.T) {
+       if testing.Short() && race.Enabled {
+               t.Skip("skipping in short mode")
+       }
        t.Parallel()
        gen := func(numRec int) func(*Writer) {
                return func(w *Writer) {