diff options
author | algochoi <86622919+algochoi@users.noreply.github.com> | 2023-02-13 18:32:22 -0500 |
---|---|---|
committer | algochoi <86622919+algochoi@users.noreply.github.com> | 2023-02-13 18:32:22 -0500 |
commit | e28ecd43e89ed5832e4d3227cc5732e6c3cb498e (patch) | |
tree | 9eabac73ab2faaaf56ab584f7a35d2dacf29ad9e | |
parent | 7dbd598190a2b834e08381b1dbc372cc499ada2f (diff) |
Remove parallelization from long testsparallelize_util
-rw-r--r-- | util/bloom/bloom_test.go | 5 | ||||
-rw-r--r-- | util/codecs/json_test.go | 3 | ||||
-rw-r--r-- | util/db/dbutil_test.go | 9 |
3 files changed, 6 insertions, 11 deletions
diff --git a/util/bloom/bloom_test.go b/util/bloom/bloom_test.go index 13aa76b13..f3be67243 100644 --- a/util/bloom/bloom_test.go +++ b/util/bloom/bloom_test.go @@ -278,12 +278,10 @@ func TestBinaryMarshalLength(t *testing.T) { } } -func TestBloomFilterMemoryConsumption(t *testing.T) { +func TestBloomFilterMemoryConsumption(t *testing.T) { //nolint:paralleltest // Don't parallelize tests that run Benchmark(). partitiontest.PartitionTest(t) - t.Parallel() t.Run("Set", func(t *testing.T) { - t.Parallel() N := 1000000 sizeBits, numHashes := Optimal(N, 0.01) prefix := uint32(0) @@ -312,7 +310,6 @@ func TestBloomFilterMemoryConsumption(t *testing.T) { require.LessOrEqual(t, uint64(result.MemBytes), uint64(result.N)) }) t.Run("Test", func(t *testing.T) { - t.Parallel() N := 1000000 sizeBits, numHashes := Optimal(N, 0.01) prefix := uint32(0) diff --git a/util/codecs/json_test.go b/util/codecs/json_test.go index 6bce13606..20c68d945 100644 --- a/util/codecs/json_test.go +++ b/util/codecs/json_test.go @@ -17,9 +17,10 @@ package codecs import ( + "testing" + "github.com/algorand/go-algorand/test/partitiontest" "github.com/stretchr/testify/require" - "testing" ) type testValue struct { diff --git a/util/db/dbutil_test.go b/util/db/dbutil_test.go index 5bf75c665..3a2bd30f6 100644 --- a/util/db/dbutil_test.go +++ b/util/db/dbutil_test.go @@ -239,9 +239,8 @@ func cleanupSqliteDb(t *testing.T, path string) { } } -func TestDBConcurrencyRW(t *testing.T) { +func TestDBConcurrencyRW(t *testing.T) { //nolint:paralleltest // Don't parallelize tests that may have sensitive timing dependencies. partitiontest.PartitionTest(t) - t.Parallel() if testing.Short() { // Since it is a long operation and can only be affected by the db package, we can skip this test when running short tests only. @@ -490,17 +489,15 @@ func TestReadingWhileWriting(t *testing.T) { } // using Write-Ahead Logging (WAL) -func TestLockingTableWhileWritingWAL(t *testing.T) { +func TestLockingTableWhileWritingWAL(t *testing.T) { //nolint:paralleltest // Non-short tests may not be worth parallelizing yet. partitiontest.PartitionTest(t) - t.Parallel() testLockingTableWhileWriting(t, true) } // using the default Rollback Journal -func TestLockingTableWhileWritingJournal(t *testing.T) { +func TestLockingTableWhileWritingJournal(t *testing.T) { //nolint:paralleltest // Non-short tests may not be worth parallelizing yet. partitiontest.PartitionTest(t) - t.Parallel() testLockingTableWhileWriting(t, false) } |