Skip to content

Commit

Permalink
Fixes to catchpoint e2e tests (#4236)
Browse files Browse the repository at this point in the history
  • Loading branch information
algorandskiy authored Jul 7, 2022
1 parent b5500cc commit 8d9c8e4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 2 additions & 0 deletions ledger/catchpointtracker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -774,6 +774,8 @@ func TestCatchpointTrackerNonblockingCatchpointWriting(t *testing.T) {
}

func TestCalculateFirstStageRounds(t *testing.T) {
partitiontest.PartitionTest(t)

type TestCase struct {
// input
oldBase basics.Round
Expand Down
10 changes: 8 additions & 2 deletions test/e2e-go/features/catchup/catchpointCatchup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ func TestBasicCatchpointCatchup(t *testing.T) {
catchpointCatchupProtocol.SeedRefreshInterval = 8
catchpointCatchupProtocol.MaxBalLookback = 2 * catchpointCatchupProtocol.SeedLookback * catchpointCatchupProtocol.SeedRefreshInterval // 32
catchpointCatchupProtocol.MaxTxnLife = 33
catchpointCatchupProtocol.CatchpointLookback = catchpointCatchupProtocol.MaxBalLookback
catchpointCatchupProtocol.EnableOnlineAccountCatchpoints = true

if runtime.GOARCH == "amd64" {
// amd64 platforms are generally quite capable, so accelerate the round times to make the test run faster.
Expand Down Expand Up @@ -135,6 +137,7 @@ func TestBasicCatchpointCatchup(t *testing.T) {
cfg, err := config.LoadConfigFromDisk(primaryNode.GetDataDir())
a.NoError(err)
cfg.CatchpointInterval = 4
cfg.MaxAcctLookback = 2
cfg.SaveToDisk(primaryNode.GetDataDir())
cfg.Archival = false
cfg.NetAddress = ""
Expand Down Expand Up @@ -253,7 +256,7 @@ func TestCatchpointLabelGeneration(t *testing.T) {
}

for _, tc := range testCases {
t.Run(fmt.Sprintf("CatchpointInterval: %v, Archival: %v", tc.catchpointInterval, tc.archival), func(t *testing.T) {
t.Run(fmt.Sprintf("CatchpointInterval_%v/Archival_%v", tc.catchpointInterval, tc.archival), func(t *testing.T) {
a := require.New(fixtures.SynchronizedTest(t))
log := logging.TestingLog(t)

Expand All @@ -267,6 +270,8 @@ func TestCatchpointLabelGeneration(t *testing.T) {
catchpointCatchupProtocol.SeedRefreshInterval = 8
catchpointCatchupProtocol.MaxBalLookback = 2 * catchpointCatchupProtocol.SeedLookback * catchpointCatchupProtocol.SeedRefreshInterval // 32
catchpointCatchupProtocol.MaxTxnLife = 33
catchpointCatchupProtocol.CatchpointLookback = catchpointCatchupProtocol.MaxBalLookback
catchpointCatchupProtocol.EnableOnlineAccountCatchpoints = true

if runtime.GOARCH == "amd64" {
// amd64 platforms are generally quite capable, so accelerate the round times to make the test run faster.
Expand All @@ -292,6 +297,7 @@ func TestCatchpointLabelGeneration(t *testing.T) {
a.NoError(err)
cfg.CatchpointInterval = tc.catchpointInterval
cfg.Archival = tc.archival
cfg.MaxAcctLookback = 2
cfg.SaveToDisk(primaryNode.GetDataDir())

// start the primary node
Expand All @@ -307,7 +313,7 @@ func TestCatchpointLabelGeneration(t *testing.T) {

// Let the network make some progress
currentRound := uint64(1)
targetRound := uint64(37)
targetRound := uint64(41)
primaryNodeRestClient := fixture.GetAlgodClientForController(primaryNode)
primaryNodeRestClient.SetAPIVersionAffinity(algodclient.APIVersionV2)
log.Infof("Building ledger history..")
Expand Down

0 comments on commit 8d9c8e4

Please sign in to comment.