mirror of
https://github.com/golang/go
synced 2024-11-12 03:50:21 -07:00
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>
This commit is contained in:
parent
35231ec7c6
commit
1368de3db2
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user