Skip to content

Commit 75f93b2

Browse files
committed
itest: add tapd harness config param for federation sync ticker interval
1 parent 499f452 commit 75f93b2

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

itest/tapd_harness.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,10 @@ type harnessOpts struct {
100100
proofCourier proof.CourierHarness
101101
custodianProofRetrievalDelay *time.Duration
102102
addrAssetSyncerDisable bool
103+
104+
// fedSyncTickerInterval is the interval at which the federation envoy
105+
// sync ticker will fire.
106+
fedSyncTickerInterval *time.Duration
103107
}
104108

105109
type harnessOption func(*harnessOpts)
@@ -242,6 +246,10 @@ func newTapdHarness(t *testing.T, ht *harnessTest, cfg tapdConfig,
242246
finalCfg.CustodianProofRetrievalDelay = *opts.custodianProofRetrievalDelay
243247
}
244248

249+
if opts.fedSyncTickerInterval != nil {
250+
finalCfg.Universe.SyncInterval = *opts.fedSyncTickerInterval
251+
}
252+
245253
return &tapdHarness{
246254
cfg: &cfg,
247255
clientCfg: finalCfg,

itest/test_harness.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,10 @@ type tapdHarnessParams struct {
366366
// synced from the above node.
367367
startupSyncNumAssets int
368368

369+
// fedSyncTickerInterval is the interval at which the federation envoy
370+
// sync ticker will fire.
371+
fedSyncTickerInterval *time.Duration
372+
369373
// noDefaultUniverseSync indicates whether the default universe server
370374
// should be added as a federation server or not.
371375
noDefaultUniverseSync bool
@@ -402,6 +406,7 @@ func setupTapdHarness(t *testing.T, ht *harnessTest,
402406
ho.proofCourier = selectedProofCourier
403407
ho.custodianProofRetrievalDelay = params.custodianProofRetrievalDelay
404408
ho.addrAssetSyncerDisable = params.addrAssetSyncerDisable
409+
ho.fedSyncTickerInterval = params.fedSyncTickerInterval
405410
}
406411

407412
tapdHarness, err := newTapdHarness(t, ht, tapdConfig{

0 commit comments

Comments
 (0)