Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,6 @@ issues:
- path: ^data.*_test\.go
linters:
- paralleltest
- path: ^gen.*_test\.go
linters:
- paralleltest
- path: ^ledger.*_test\.go
linters:
- paralleltest
Expand Down
4 changes: 4 additions & 0 deletions data/bookkeeping/genesis_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ import (

func TestGenesis_Balances(t *testing.T) {
partitiontest.PartitionTest(t)
t.Parallel()

containsErrorFunc := func(str string) assert.ErrorAssertionFunc {
return func(_ assert.TestingT, err error, i ...interface{}) bool {
require.ErrorContains(t, err, str)
Expand Down Expand Up @@ -141,7 +143,9 @@ func TestGenesis_Balances(t *testing.T) {
},
}
for _, tt := range tests {
tt := tt
t.Run(tt.name, func(t *testing.T) {
t.Parallel()
genesis := Genesis{
Allocation: tt.fields.Allocation,
FeeSink: tt.fields.FeeSink,
Expand Down
15 changes: 9 additions & 6 deletions gen/generate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,15 @@ package gen
import (
"encoding/json"
"fmt"
"github.com/algorand/go-algorand/data/basics"
"io"
"os"
"path/filepath"
"strings"
"sync"
"testing"

"github.com/algorand/go-algorand/data/basics"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

Expand All @@ -39,7 +40,7 @@ import (
"github.com/algorand/go-algorand/util/db"
)

func TestLoadMultiRootKeyConcurrent(t *testing.T) {
func TestLoadMultiRootKeyConcurrent(t *testing.T) { //nolint:paralleltest // For unclear reasons, the test is skipped.
t.Skip() // skip in auto-test mode
a := require.New(t)
tempDir := t.TempDir()
Expand Down Expand Up @@ -78,7 +79,7 @@ func TestLoadMultiRootKeyConcurrent(t *testing.T) {
}
}

func TestLoadSingleRootKeyConcurrent(t *testing.T) {
func TestLoadSingleRootKeyConcurrent(t *testing.T) { //nolint:paralleltest // For unclear reasons, the test is skipped.
t.Skip() // skip in auto-test mode
a := require.New(t)
tempDir := t.TempDir()
Expand Down Expand Up @@ -108,6 +109,8 @@ func TestLoadSingleRootKeyConcurrent(t *testing.T) {

func TestGenesisRoundoff(t *testing.T) {
partitiontest.PartitionTest(t)
t.Parallel()

verbosity := strings.Builder{}
genesisData := DefaultGenesis
genesisData.NetworkName = "wat"
Expand All @@ -127,9 +130,8 @@ func TestGenesisRoundoff(t *testing.T) {
// * For each `testCase`, there is a corresponding `genesis.json` in `gen/resources` representing the known, valid output.
// * When adding test cases, it's assumed folks peer review new artifacts in `gen/resources`.
// * Since _some_ `genesis.json` values are non-deterministic, the test replaces these values with static values to facilitate equality checks.
func TestGenesisJsonCreation(t *testing.T) {
func TestGenesisJsonCreation(t *testing.T) { //nolint:paralleltest // Do not parallelize GenerateGenesisFiles().
partitiontest.PartitionTest(t)
t.Parallel()

type testCase struct {
name string
Expand Down Expand Up @@ -232,11 +234,12 @@ func TestGenesisJsonCreation(t *testing.T) {
}
}

for _, tc := range []testCase{
for _, tc := range []testCase{ //nolint:paralleltest // Do not parallelize GenerateGenesisFiles().
base(),
balance(),
testnet(),
} {
tc := tc
t.Run(fmt.Sprintf("name=%v", tc.name), func(t *testing.T) {
gd := tc.gd
gd.LastPartKeyRound = uint64(quickLastPartKeyRound)
Expand Down