mirror of
https://github.com/golang/go
synced 2024-11-12 00:30:22 -07:00
zip: fix data race in test
R=golang-dev, gri CC=golang-dev https://golang.org/cl/5492073
This commit is contained in:
parent
d2933e9902
commit
315b361f89
@ -163,10 +163,10 @@ func readTestZip(t *testing.T, zt ZipTest) {
|
||||
done := make(chan bool)
|
||||
for i := 0; i < 5; i++ {
|
||||
for j, ft := range zt.File {
|
||||
go func() {
|
||||
go func(j int, ft ZipTestFile) {
|
||||
readTestFile(t, ft, z.File[j])
|
||||
done <- true
|
||||
}()
|
||||
}(j, ft)
|
||||
n++
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user