Skip to content

Commit

Permalink
Tests: Adjust catchup e2e tests for non-archival relays (#5917)
Browse files Browse the repository at this point in the history
  • Loading branch information
gmalouf authored Jan 23, 2024
1 parent 135a1b4 commit 2e0644c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
3 changes: 3 additions & 0 deletions netdeploy/networkTemplate.go
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,9 @@ func createConfigFile(node remote.NodeConfigGoal, configFile string, numNodes in
if node.IsRelay {
// Have relays listen on any localhost port
cfg.NetAddress = "127.0.0.1:0"

cfg.Archival = false // make it explicit non-archival
cfg.MaxBlockHistoryLookback = 20000 // to save blocks beyond MaxTxnLife=13
} else {
// Non-relays should not open incoming connections
cfg.IncomingConnectionsLimit = 0
Expand Down
19 changes: 14 additions & 5 deletions test/e2e-go/features/catchup/catchpointCatchup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,10 @@ func configureCatchpointGeneration(a *require.Assertions, nodeController *nodeco
a.NoError(err)

cfg.CatchpointInterval = basicTestCatchpointInterval
cfg.Archival = false // make it explicit non-archival
cfg.MaxBlockHistoryLookback = 20000 // to save blocks beyond MaxTxnLife=13
cfg.CatchpointTracking = 2 // to enable catchpoints on non-archival nodes
cfg.CatchpointFileHistoryLength = 30 // to store more than 2 default catchpoints
cfg.MaxAcctLookback = 2
err = cfg.SaveToDisk(nodeController.GetDataDir())
a.NoError(err)
Expand Down Expand Up @@ -383,7 +387,6 @@ func TestCatchpointLabelGeneration(t *testing.T) {
expectLabels bool
}{
{4, true, true},
{4, false, true},
{0, true, false},
}

Expand Down Expand Up @@ -506,8 +509,11 @@ func TestNodeTxHandlerRestart(t *testing.T) {
a.NoError(err)
const catchpointInterval = 16
cfg.CatchpointInterval = catchpointInterval
cfg.CatchpointTracking = 2
cfg.TxSyncIntervalSeconds = 200000 // disable txSync
cfg.Archival = false // make it explicit non-archival
cfg.MaxBlockHistoryLookback = 20000 // to save blocks beyond MaxTxnLife=13
cfg.CatchpointTracking = 2 // to enable catchpoints on non-archival nodes
cfg.CatchpointFileHistoryLength = 30 // to store more than 2 default catchpoints
cfg.TxSyncIntervalSeconds = 200000 // disable txSync
cfg.SaveToDisk(relayNode.GetDataDir())

fixture.Start()
Expand Down Expand Up @@ -612,8 +618,11 @@ func TestReadyEndpoint(t *testing.T) {
a.NoError(err)
const catchpointInterval = 16
cfg.CatchpointInterval = catchpointInterval
cfg.CatchpointTracking = 2
cfg.TxSyncIntervalSeconds = 200000 // disable txSync
cfg.Archival = false // make it explicit non-archival
cfg.MaxBlockHistoryLookback = 20000 // to save blocks beyond MaxTxnLife=13
cfg.CatchpointTracking = 2 // to enable catchpoints on non-archival nodes
cfg.CatchpointFileHistoryLength = 30 // to store more than 2 default catchpoints
cfg.TxSyncIntervalSeconds = 200000 // disable txSync
cfg.SaveToDisk(relayNode.GetDataDir())

fixture.Start()
Expand Down

0 comments on commit 2e0644c

Please sign in to comment.