From: Brad Fitzpatrick Date: Mon, 21 Nov 2016 19:09:42 +0000 (+0000) Subject: archive/zip: skip large concurrent tests in race mode X-Git-Tag: go1.8beta1~89 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=1368de3db23ed51992a57cc828c5f14558b4b49f;p=gostls13.git 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 TryBot-Result: Gobot Gobot Reviewed-by: Ian Lance Taylor --- 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) {