Skip to content

Commit

Permalink
Fix TestWatcherCloudFetchers flakiness (#51088)
Browse files Browse the repository at this point in the history
  • Loading branch information
GavinFrazar authored Jan 15, 2025
1 parent d48388b commit d138664
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/srv/db/watcher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,16 @@ func TestWatcherCloudFetchers(t *testing.T) {
testCtx.setupDatabaseServer(ctx, t, agentParams{
// Keep ResourceMatchers as nil to disable resource matchers.
OnReconcile: func(d types.Databases) {
if len(d) == 0 {
// The dynamic resource matchers and cloud watchers will both
// trigger a reconciliation, but dynamic matchers should return
// 0 resources from first init, whereas the cloud watchers
// should return databases.
// Dynamic matchers are included in config to test that the
// dynamic matcher AWS settings are not applied to cloud watcher
// databases.
return
}
reconcileCh <- d
},
ResourceMatchers: []services.ResourceMatcher{{
Expand Down

0 comments on commit d138664

Please sign in to comment.