Commit 1368de3d authored by Brad Fitzpatrick's avatar Brad Fitzpatrick

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: default avatarIan Lance Taylor <iant@golang.org>
parent 35231ec7
......@@ -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) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment