Skip to content

Commit

Permalink
Fix tests that are explicitly not supposed to be parallel
Browse files Browse the repository at this point in the history
# Conflicts:
#	data/transactions/logic/assembler_test.go
#	ledger/internal/eval_blackbox_test.go
  • Loading branch information
jdtzmn committed Nov 1, 2022
1 parent 3fec0d3 commit 5a022d6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
4 changes: 1 addition & 3 deletions data/transactions/logic/assembler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2800,10 +2800,8 @@ func TestGetSpec(t *testing.T) {
require.Equal(t, "unknown opcode: nonsense", ops.Errors[1].Err.Error())
}

func TestAddPseudoDocTags(t *testing.T) {
func TestAddPseudoDocTags(t *testing.T) { //nolint:paralleltest // Not parallel because it modifies pseudoOps and opDocByName which are global maps
partitiontest.PartitionTest(t)
// Not parallel because it modifies pseudoOps and opDocByName which are global maps
// t.Parallel()
defer func() {
delete(pseudoOps, "tests")
delete(opDocByName, "multiple")
Expand Down
8 changes: 2 additions & 6 deletions data/transactions/logic/evalAppTxn_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1761,9 +1761,7 @@ int 1
`

for _, unified := range []bool{true, false} {
t.Run(fmt.Sprintf("unified=%t", unified), func(t *testing.T) {
// t.Parallel() NO! unified variable is actually shared

t.Run(fmt.Sprintf("unified=%t", unified), func(t *testing.T) { //nolint:paralleltest // NO t.Parallel(). unified variable is actually shared
ep, parentTx, ledger := MakeSampleEnv()
ep.Proto.UnifyInnerTxIDs = unified

Expand Down Expand Up @@ -2226,10 +2224,8 @@ func TestInnerTxIDCaching(t *testing.T) {
parentAppID := basics.AppIndex(888)
childAppID := basics.AppIndex(222)

for _, unified := range []bool{true, false} {
for _, unified := range []bool{true, false} { //nolint:paralleltest // NO t.Parallel(). unified variable is actually shared
t.Run(fmt.Sprintf("unified=%t", unified), func(t *testing.T) {
// t.Parallel() NO! unified variable is actually shared

ep, parentTx, ledger := MakeSampleEnv()
ep.Proto.UnifyInnerTxIDs = unified

Expand Down

0 comments on commit 5a022d6

Please sign in to comment.