diff options
author | Brad Fitzpatrick <bradfitz@golang.org> | 2016-11-21 19:09:42 +0000 |
---|---|---|
committer | Brad Fitzpatrick <bradfitz@golang.org> | 2016-11-21 20:51:42 +0000 |
commit | 1368de3db23ed51992a57cc828c5f14558b4b49f (patch) | |
tree | 139e56adbd7895996e19bf9c9d0ac6a5d1f6633a /src/archive | |
parent | 35231ec7c6a6d9277bf6ac53cb0142e4d37c2ece (diff) | |
download | go-git-1368de3db23ed51992a57cc828c5f14558b4b49f.tar.gz |
archive/zip: skip large concurrent tests in race mode
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>
Diffstat (limited to 'src/archive')
-rw-r--r-- | src/archive/zip/zip_test.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/archive/zip/zip_test.go b/src/archive/zip/zip_test.go index e1e67e5357..8801e90413 100644 --- a/src/archive/zip/zip_test.go +++ b/src/archive/zip/zip_test.go @@ -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) { |