Skip to content

Commit

Permalink
itest: add tapd harness config param for federation sync ticker interval
Browse files Browse the repository at this point in the history
  • Loading branch information
ffranr committed Nov 29, 2023
1 parent dafa889 commit 2722552
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
8 changes: 8 additions & 0 deletions itest/tapd_harness.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ type harnessOpts struct {
proofCourier proof.CourierHarness
custodianProofRetrievalDelay *time.Duration
addrAssetSyncerDisable bool

// fedSyncTickerInterval is the interval at which the federation envoy
// sync ticker will fire.
fedSyncTickerInterval *time.Duration
}

type harnessOption func(*harnessOpts)
Expand Down Expand Up @@ -229,6 +233,10 @@ func newTapdHarness(t *testing.T, ht *harnessTest, cfg tapdConfig,
finalCfg.CustodianProofRetrievalDelay = *opts.custodianProofRetrievalDelay
}

if opts.fedSyncTickerInterval != nil {
finalCfg.Universe.SyncInterval = *opts.fedSyncTickerInterval
}

return &tapdHarness{
cfg: &cfg,
clientCfg: finalCfg,
Expand Down
5 changes: 5 additions & 0 deletions itest/test_harness.go
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,10 @@ type tapdHarnessParams struct {
// startupSyncNumAssets is the number of assets that are expected to be
// synced from the above node.
startupSyncNumAssets int

// fedSyncTickerInterval is the interval at which the federation envoy
// sync ticker will fire.
fedSyncTickerInterval *time.Duration
}

type Option func(*tapdHarnessParams)
Expand Down Expand Up @@ -378,6 +382,7 @@ func setupTapdHarness(t *testing.T, ht *harnessTest,
ho.proofCourier = selectedProofCourier
ho.custodianProofRetrievalDelay = params.custodianProofRetrievalDelay
ho.addrAssetSyncerDisable = params.addrAssetSyncerDisable
ho.fedSyncTickerInterval = params.fedSyncTickerInterval
}

tapdHarness, err := newTapdHarness(
Expand Down

0 comments on commit 2722552

Please sign in to comment.