Skip to content
Merged
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
14 changes: 7 additions & 7 deletions agreement/bundle_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ import (
"github.com/algorand/go-algorand/data/committee"
"github.com/algorand/go-algorand/logging"
"github.com/algorand/go-algorand/protocol"
"github.com/algorand/go-algorand/testpartitioning"
"github.com/algorand/go-algorand/test/partitiontest"
)

// Test Bundle Creation
func TestBundleCreation(t *testing.T) {
testpartitioning.PartitionTest(t)
partitiontest.PartitionTest(t)

ledger, addresses, vrfSecrets, otSecrets := readOnlyFixture100()
round := ledger.NextRound()
Expand Down Expand Up @@ -71,7 +71,7 @@ func TestBundleCreation(t *testing.T) {

// Test Bundle validation with Zero Votes
func TestBundleCreationWithZeroVotes(t *testing.T) {
testpartitioning.PartitionTest(t)
partitiontest.PartitionTest(t)

//ledger, addresses, vrfSecrets, otSecrets := readOnlyFixture100()
ledger, _, _, _ := readOnlyFixture100()
Expand Down Expand Up @@ -110,7 +110,7 @@ func makeBundlePanicWrapper(t *testing.T, message string, proposal proposalValue

//Test Bundle Creation with Validation for duplicate votes from same sender
func TestBundleCreationWithVotesFromSameAddress(t *testing.T) {
testpartitioning.PartitionTest(t)
partitiontest.PartitionTest(t)

ledger, addresses, vrfSecrets, otSecrets := readOnlyFixture10()
round := ledger.NextRound()
Expand Down Expand Up @@ -175,7 +175,7 @@ func TestBundleCreationWithVotesFromSameAddress(t *testing.T) {

//Test Bundle Creation with Validation
func TestBundleCreationWithEquivocationVotes(t *testing.T) {
testpartitioning.PartitionTest(t)
partitiontest.PartitionTest(t)

ledger, addresses, vrfSecrets, otSecrets := readOnlyFixture10()
round := ledger.NextRound()
Expand Down Expand Up @@ -285,7 +285,7 @@ func TestBundleCreationWithEquivocationVotes(t *testing.T) {

//Test Bundle Creation with Validation
func TestBundleCertificationWithEquivocationVotes(t *testing.T) {
testpartitioning.PartitionTest(t)
partitiontest.PartitionTest(t)

ledger, addresses, vrfSecrets, otSecrets := readOnlyFixture10()
round := ledger.NextRound()
Expand Down Expand Up @@ -360,7 +360,7 @@ func certificatePanicWrapper(t *testing.T, message string, ub unauthenticatedBun

// Test Bundle Creation with Equivocation Votes under Quorum
func TestBundleCreationWithEquivocationVotesUnderQuorum(t *testing.T) {
testpartitioning.PartitionTest(t)
partitiontest.PartitionTest(t)

ledger, addresses, vrfSecrets, otSecrets := readOnlyFixture100()
round := ledger.NextRound()
Expand Down
22 changes: 11 additions & 11 deletions agreement/certificate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
"github.com/algorand/go-algorand/crypto"
"github.com/algorand/go-algorand/logging"
"github.com/algorand/go-algorand/protocol"
"github.com/algorand/go-algorand/testpartitioning"
"github.com/algorand/go-algorand/test/partitiontest"
)

func makeCertTesting(digest crypto.Digest, votes []vote, equiVotes []equivocationVote) Certificate {
Expand All @@ -43,7 +43,7 @@ func verifyBundleAgainstLedger(b unauthenticatedBundle, l Ledger, avv *AsyncVote
}

func TestCertificateGoodCertificateBasic(t *testing.T) {
testpartitioning.PartitionTest(t)
partitiontest.PartitionTest(t)

ledger, addresses, vrfSecrets, otSecrets := readOnlyFixture100()
round := ledger.NextRound()
Expand Down Expand Up @@ -71,7 +71,7 @@ func TestCertificateGoodCertificateBasic(t *testing.T) {
}

func TestCertificateGoodCertificateEarlyBreak(t *testing.T) {
testpartitioning.PartitionTest(t)
partitiontest.PartitionTest(t)

ledger, addresses, vrfSecrets, otSecrets := readOnlyFixture100()
round := ledger.NextRound()
Expand Down Expand Up @@ -99,7 +99,7 @@ func TestCertificateGoodCertificateEarlyBreak(t *testing.T) {
}

func TestCertificateFinalCert(t *testing.T) {
testpartitioning.PartitionTest(t)
partitiontest.PartitionTest(t)

ledger, addresses, vrfSecrets, otSecrets := readOnlyFixture100()
round := ledger.NextRound()
Expand Down Expand Up @@ -127,7 +127,7 @@ func TestCertificateFinalCert(t *testing.T) {
}

func TestCertificateBadCertificateWithFakeDoubleVote(t *testing.T) {
testpartitioning.PartitionTest(t)
partitiontest.PartitionTest(t)

ledger, addresses, vrfSecrets, otSecrets := readOnlyFixture100()
round := ledger.NextRound()
Expand Down Expand Up @@ -182,7 +182,7 @@ func TestCertificateBadCertificateWithFakeDoubleVote(t *testing.T) {
}

func TestCertificateDifferentBlock(t *testing.T) {
testpartitioning.PartitionTest(t)
partitiontest.PartitionTest(t)

ledger, addresses, vrfSecrets, otSecrets := readOnlyFixture100()
round := ledger.NextRound()
Expand Down Expand Up @@ -213,7 +213,7 @@ func TestCertificateDifferentBlock(t *testing.T) {
}

func TestCertificateNoCertStep(t *testing.T) {
testpartitioning.PartitionTest(t)
partitiontest.PartitionTest(t)

ledger, addresses, vrfSecrets, otSecrets := readOnlyFixture100()
round := ledger.NextRound()
Expand All @@ -237,7 +237,7 @@ func TestCertificateNoCertStep(t *testing.T) {
}

func TestCertificateNotEnoughVotesToCert(t *testing.T) {
testpartitioning.PartitionTest(t)
partitiontest.PartitionTest(t)

ledger, addresses, vrfSecrets, otSecrets := readOnlyFixture100()
round := ledger.NextRound()
Expand Down Expand Up @@ -271,7 +271,7 @@ func TestCertificateNotEnoughVotesToCert(t *testing.T) {
}

func TestCertificateCertWrongRound(t *testing.T) {
testpartitioning.PartitionTest(t)
partitiontest.PartitionTest(t)

ledger, addresses, vrfSecrets, otSecrets := readOnlyFixture100()
round := ledger.NextRound()
Expand Down Expand Up @@ -302,7 +302,7 @@ func TestCertificateCertWrongRound(t *testing.T) {
}

func TestCertificateCertWithTooFewVotes(t *testing.T) {
testpartitioning.PartitionTest(t)
partitiontest.PartitionTest(t)

ledger, addresses, vrfSecrets, otSecrets := readOnlyFixture100()
round := ledger.NextRound()
Expand Down Expand Up @@ -332,7 +332,7 @@ func TestCertificateCertWithTooFewVotes(t *testing.T) {
}

func TestCertificateDupVote(t *testing.T) {
testpartitioning.PartitionTest(t)
partitiontest.PartitionTest(t)

ledger, addresses, vrfSecrets, otSecrets := readOnlyFixture100()
round := ledger.NextRound()
Expand Down
22 changes: 11 additions & 11 deletions agreement/cryptoRequestContext_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"github.com/stretchr/testify/require"

"github.com/algorand/go-algorand/protocol"
"github.com/algorand/go-algorand/testpartitioning"
"github.com/algorand/go-algorand/test/partitiontest"
)

func forEachTagDo(fn func(protocol.Tag)) {
Expand All @@ -33,7 +33,7 @@ func forEachTagDo(fn func(protocol.Tag)) {
}

func TestCryptoRequestContextAddCancelRound(t *testing.T) {
testpartitioning.PartitionTest(t)
partitiontest.PartitionTest(t)

pending := makePendingRequestsContext()
rnd := round(10)
Expand Down Expand Up @@ -68,7 +68,7 @@ func TestCryptoRequestContextAddCancelRound(t *testing.T) {
}

func TestCryptoRequestContextAddCancelPeriod(t *testing.T) {
testpartitioning.PartitionTest(t)
partitiontest.PartitionTest(t)

pending := makePendingRequestsContext()
rnd := round(10)
Expand Down Expand Up @@ -104,7 +104,7 @@ func TestCryptoRequestContextAddCancelPeriod(t *testing.T) {
}

func TestCryptoRequestContextAddCancelProposal(t *testing.T) {
testpartitioning.PartitionTest(t)
partitiontest.PartitionTest(t)

pending := makePendingRequestsContext()
rnd := round(10)
Expand All @@ -130,7 +130,7 @@ func TestCryptoRequestContextAddCancelProposal(t *testing.T) {
}

func TestCryptoRequestContextAddCancelPinnedProposal(t *testing.T) {
testpartitioning.PartitionTest(t)
partitiontest.PartitionTest(t)

pending := makePendingRequestsContext()
rnd := round(10)
Expand All @@ -155,7 +155,7 @@ func TestCryptoRequestContextAddCancelPinnedProposal(t *testing.T) {
}

func TestCryptoRequestContextAddNoCancelPinnedProposal(t *testing.T) {
testpartitioning.PartitionTest(t)
partitiontest.PartitionTest(t)

pending := makePendingRequestsContext()
rnd := round(10)
Expand All @@ -180,7 +180,7 @@ func TestCryptoRequestContextAddNoCancelPinnedProposal(t *testing.T) {
}

func TestCryptoRequestContextAddNoInterferencePinnedProposal(t *testing.T) {
testpartitioning.PartitionTest(t)
partitiontest.PartitionTest(t)

pending := makePendingRequestsContext()
rnd := round(10)
Expand All @@ -205,7 +205,7 @@ func TestCryptoRequestContextAddNoInterferencePinnedProposal(t *testing.T) {
}

func TestCryptoRequestContextCleanupByRound(t *testing.T) {
testpartitioning.PartitionTest(t)
partitiontest.PartitionTest(t)

pending := makePendingRequestsContext()
rnd := round(10)
Expand Down Expand Up @@ -254,7 +254,7 @@ func TestCryptoRequestContextCleanupByRound(t *testing.T) {
}

func TestCryptoRequestContextCleanupByRoundPinnedCertify(t *testing.T) {
testpartitioning.PartitionTest(t)
partitiontest.PartitionTest(t)

pending := makePendingRequestsContext()
rnd := round(10)
Expand Down Expand Up @@ -317,7 +317,7 @@ func TestCryptoRequestContextCleanupByRoundPinnedCertify(t *testing.T) {
}

func TestCryptoRequestContextCleanupByPeriod(t *testing.T) {
testpartitioning.PartitionTest(t)
partitiontest.PartitionTest(t)

pending := makePendingRequestsContext()
rnd := round(10)
Expand Down Expand Up @@ -380,7 +380,7 @@ func TestCryptoRequestContextCleanupByPeriod(t *testing.T) {
}

func TestCryptoRequestContextCleanupByPeriodPinned(t *testing.T) {
testpartitioning.PartitionTest(t)
partitiontest.PartitionTest(t)

pending := makePendingRequestsContext()
rnd := round(10)
Expand Down
4 changes: 2 additions & 2 deletions agreement/cryptoVerifier_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import (
"github.com/algorand/go-algorand/data/committee"
"github.com/algorand/go-algorand/logging"
"github.com/algorand/go-algorand/protocol"
"github.com/algorand/go-algorand/testpartitioning"
"github.com/algorand/go-algorand/test/partitiontest"
)

var _ = fmt.Printf
Expand Down Expand Up @@ -137,7 +137,7 @@ func getSelectorCapacity(tag protocol.Tag) int {
}

func TestCryptoVerifierBuffers(t *testing.T) {
testpartitioning.PartitionTest(t)
partitiontest.PartitionTest(t)

t.Skip("Test is flaky")

Expand Down
4 changes: 2 additions & 2 deletions agreement/demux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import (
"github.com/algorand/go-algorand/data/committee"
"github.com/algorand/go-algorand/logging"
"github.com/algorand/go-algorand/protocol"
"github.com/algorand/go-algorand/testpartitioning"
"github.com/algorand/go-algorand/test/partitiontest"
"github.com/algorand/go-algorand/util/timers"
)

Expand Down Expand Up @@ -415,7 +415,7 @@ var demuxTestUsecases = []demuxTestUsecase{
}

func TestDemuxNext(t *testing.T) {
testpartitioning.PartitionTest(t)
partitiontest.PartitionTest(t)

dt := &demuxTester{T: t}
dt.Test()
Expand Down
4 changes: 2 additions & 2 deletions agreement/encoding_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ import (
"github.com/stretchr/testify/require"

"github.com/algorand/go-algorand/protocol"
"github.com/algorand/go-algorand/testpartitioning"
"github.com/algorand/go-algorand/test/partitiontest"
)

func TestEmptyEncoding(t *testing.T) {
testpartitioning.PartitionTest(t)
partitiontest.PartitionTest(t)

var v vote
require.Equal(t, 1, len(protocol.Encode(&v)))
Expand Down
6 changes: 3 additions & 3 deletions agreement/gossip/networkFull_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
"github.com/algorand/go-algorand/logging"
"github.com/algorand/go-algorand/network"
"github.com/algorand/go-algorand/protocol"
"github.com/algorand/go-algorand/testpartitioning"
"github.com/algorand/go-algorand/test/partitiontest"
"github.com/algorand/go-algorand/util"
)

Expand Down Expand Up @@ -126,7 +126,7 @@ func shutdownNetwork(nets []*networkImpl, counters []*messageCounter) {
}

func TestNetworkImplFullStackLong(t *testing.T) {
testpartitioning.PartitionTest(t)
partitiontest.PartitionTest(t)

if testing.Short() {
t.Skip()
Expand All @@ -136,7 +136,7 @@ func TestNetworkImplFullStackLong(t *testing.T) {
}

func TestNetworkImplFullStackQuick(t *testing.T) {
testpartitioning.PartitionTest(t)
partitiontest.PartitionTest(t)

if !testing.Short() {
t.Skip()
Expand Down
4 changes: 2 additions & 2 deletions agreement/gossip/network_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import (
"github.com/algorand/go-algorand/logging"
"github.com/algorand/go-algorand/network"
"github.com/algorand/go-algorand/protocol"
"github.com/algorand/go-algorand/testpartitioning"
"github.com/algorand/go-algorand/test/partitiontest"
)

type sentMessage struct {
Expand Down Expand Up @@ -339,7 +339,7 @@ func spinNetworkImpl(domain *whiteholeDomain) (whiteholeNet *whiteholeNetwork, c
}

func TestNetworkImpl(t *testing.T) {
testpartitioning.PartitionTest(t)
partitiontest.PartitionTest(t)

t.Parallel()

Expand Down
Loading