mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
swarm/network: run TestRetrieval with fewer nodes with -race
Otherwise we get a failure due to extensive memory usage, as the CGO
runtime cannot allocate more bytes ("ThreadSanitizer failed to
allocate").
This commit is contained in:
parent
5798cdddb5
commit
63d34ba7d1
1 changed files with 7 additions and 8 deletions
|
|
@ -82,18 +82,17 @@ func TestRetrieval(t *testing.T) {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
var nodeCnt []int
|
nodeCnt := []int{16}
|
||||||
var chnkCnt []int
|
chnkCnt := []int{32}
|
||||||
//if the `longrunning` flag has been provided
|
|
||||||
//run more test combinations
|
|
||||||
if *longrunning {
|
if *longrunning {
|
||||||
nodeCnt = []int{16, 32, 128}
|
nodeCnt = []int{16, 32, 128}
|
||||||
chnkCnt = []int{4, 32, 256}
|
chnkCnt = []int{4, 32, 256}
|
||||||
} else {
|
} else if testutil.RaceEnabled {
|
||||||
//default test
|
nodeCnt = []int{4}
|
||||||
nodeCnt = []int{16}
|
chnkCnt = []int{4}
|
||||||
chnkCnt = []int{32}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, n := range nodeCnt {
|
for _, n := range nodeCnt {
|
||||||
for _, c := range chnkCnt {
|
for _, c := range chnkCnt {
|
||||||
t.Run(fmt.Sprintf("TestRetrieval_%d_%d", n, c), func(t *testing.T) {
|
t.Run(fmt.Sprintf("TestRetrieval_%d_%d", n, c), func(t *testing.T) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue