diff --git a/pkg/api/bzz_test.go b/pkg/api/bzz_test.go index 5027197ba3f..e466e5456b1 100644 --- a/pkg/api/bzz_test.go +++ b/pkg/api/bzz_test.go @@ -68,6 +68,7 @@ func TestBzzUploadDownloadWithRedundancy(t *testing.T) { fileDownloadResource := func(addr string) string { return "/bzz/" + addr + "/" } testRedundancy := func(t *testing.T, rLevel redundancy.Level, encrypt bool, levels int, chunkCnt int, shardCnt int, parityCnt int) { + t.Helper() seed, err := pseudorand.NewSeed() if err != nil { t.Fatal(err) @@ -197,6 +198,7 @@ func TestBzzUploadDownloadWithRedundancy(t *testing.T) { }) } for _, rLevel := range []redundancy.Level{1, 2, 3, 4} { + rLevel := rLevel t.Run(fmt.Sprintf("level=%d", rLevel), func(t *testing.T) { for _, encrypt := range []bool{false, true} { encrypt := encrypt @@ -216,17 +218,18 @@ func TestBzzUploadDownloadWithRedundancy(t *testing.T) { case 3: chunkCnt = shardCnt*shardCnt + 1 } + levels := levels t.Run(fmt.Sprintf("encrypt=%v levels=%d chunks=%d", encrypt, levels, chunkCnt), func(t *testing.T) { if levels > 2 && (encrypt == (rLevel%2 == 1)) { t.Skip("skipping to save time") } + t.Parallel() testRedundancy(t, rLevel, encrypt, levels, chunkCnt, shardCnt, parityCnt) }) } } }) } - } func TestBzzFiles(t *testing.T) { diff --git a/pkg/file/joiner/joiner_test.go b/pkg/file/joiner/joiner_test.go index aceef3234c9..d5cbf9e1bd5 100644 --- a/pkg/file/joiner/joiner_test.go +++ b/pkg/file/joiner/joiner_test.go @@ -1226,6 +1226,7 @@ func TestJoinerRedundancyMultilevel(t *testing.T) { getter.StrategyTimeout = 100 * time.Millisecond test := func(t *testing.T, rLevel redundancy.Level, encrypt bool, size int) { + t.Helper() store := mockstorer.NewForgettingStore(inmemchunkstore.New()) testutil.CleanupCloser(t, store) seed, err := pseudorand.NewSeed() @@ -1339,6 +1340,7 @@ func TestJoinerRedundancyMultilevel(t *testing.T) { if r2level[rLevel] != levels || encrypt != encryptChunk[rLevel] { t.Skip("skipping to save time") } + t.Parallel() test(t, rLevel, encrypt, chunkCnt) }) switch levels { @@ -1350,6 +1352,7 @@ func TestJoinerRedundancyMultilevel(t *testing.T) { continue } t.Run(fmt.Sprintf("encrypt=%v levels=%d chunks=%d full", encrypt, levels, chunkCnt), func(t *testing.T) { + t.Parallel() test(t, rLevel, encrypt, chunkCnt) }) }