Skip to content

Commit be51ad0

Browse files
committed
itest: turn on syncer cache by default
To make sure the syncer cache doesn't have any other hidden bugs, we turn it on by default in the integration tests.
1 parent 4208aa7 commit be51ad0

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

itest/tapd_harness.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,10 @@ type harnessOpts struct {
126126
// sqliteDatabaseFilePath is the path to the SQLite database file to
127127
// use.
128128
sqliteDatabaseFilePath *string
129+
130+
// disableSyncCache is a flag that can be set to true to disable the
131+
// universe syncer cache.
132+
disableSyncCache bool
129133
}
130134

131135
type harnessOption func(*harnessOpts)
@@ -283,6 +287,10 @@ func newTapdHarness(t *testing.T, ht *harnessTest, cfg tapdConfig,
283287
finalCfg.Universe.SyncInterval = *opts.fedSyncTickerInterval
284288
}
285289

290+
if !opts.disableSyncCache {
291+
finalCfg.Universe.MultiverseCaches.SyncerCacheEnabled = true
292+
}
293+
286294
return &tapdHarness{
287295
cfg: &cfg,
288296
clientCfg: finalCfg,

itest/test_harness.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,9 @@ type tapdHarnessParams struct {
378378
// sqliteDatabaseFilePath is the path to the SQLite database file to
379379
// use.
380380
sqliteDatabaseFilePath *string
381+
382+
// disableSyncCache indicates whether the sync cache should be disabled.
383+
disableSyncCache bool
381384
}
382385

383386
type Option func(*tapdHarnessParams)
@@ -413,6 +416,7 @@ func setupTapdHarness(t *testing.T, ht *harnessTest,
413416
ho.addrAssetSyncerDisable = params.addrAssetSyncerDisable
414417
ho.fedSyncTickerInterval = params.fedSyncTickerInterval
415418
ho.sqliteDatabaseFilePath = params.sqliteDatabaseFilePath
419+
ho.disableSyncCache = params.disableSyncCache
416420
}
417421

418422
tapdCfg := tapdConfig{

0 commit comments

Comments
 (0)