From ccb89ca6356031b16932058075df3f8d70713667 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Levente=20T=C3=B3th?= Date: Thu, 21 Dec 2023 16:25:02 +0100 Subject: [PATCH] test: faster test --- pkg/file/redundancy/getter/getter_test.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pkg/file/redundancy/getter/getter_test.go b/pkg/file/redundancy/getter/getter_test.go index 2b85d11c589..60f2dbf941c 100644 --- a/pkg/file/redundancy/getter/getter_test.go +++ b/pkg/file/redundancy/getter/getter_test.go @@ -37,20 +37,20 @@ func TestGetterRACE(t *testing.T) { } var tcs []getterTest - for bufSize := 3; bufSize <= 128; bufSize += 21 { - for shardCnt := bufSize/2 + 1; shardCnt <= bufSize; shardCnt += 21 { + for bufSize := 3; bufSize <= 128; bufSize += 50 { + for shardCnt := bufSize/2 + 1; shardCnt <= bufSize; shardCnt += 50 { parityCnt := bufSize - shardCnt erasures := mrand.Perm(parityCnt - 1) - if len(erasures) > 3 { - erasures = erasures[:3] + if len(erasures) > 2 { + erasures = erasures[:2] } for _, erasureCnt := range erasures { tcs = append(tcs, getterTest{bufSize, shardCnt, erasureCnt}) } tcs = append(tcs, getterTest{bufSize, shardCnt, parityCnt}, getterTest{bufSize, shardCnt, parityCnt + 1}) erasures = mrand.Perm(shardCnt - 1) - if len(erasures) > 3 { - erasures = erasures[:3] + if len(erasures) > 2 { + erasures = erasures[:2] } for _, erasureCnt := range erasures { tcs = append(tcs, getterTest{bufSize, shardCnt, erasureCnt + parityCnt + 1}) @@ -156,7 +156,7 @@ func testDecodingFallback(t *testing.T, s getter.Strategy, strict bool) { bufSize := 12 shardCnt := 6 - store := mockstorer.NewDelayedStore(inmem.New()) + store := mockstorer.NewDelayedStore(inmem.New()) buf := make([][]byte, bufSize) addrs := initData(t, buf, shardCnt, store)