Skip to content

Commit

Permalink
Prevent tests from hitting the rate limit
Browse files Browse the repository at this point in the history
  • Loading branch information
bergundy committed Jun 8, 2023
1 parent ade0c9b commit b4438b1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
5 changes: 5 additions & 0 deletions tests/versioning_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,11 @@ func (s *versioningIntegSuite) SetupSuite() {
dynamicconfig.MatchingForwarderMaxChildrenPerNode: partitionTreeDegree,
dynamicconfig.TaskQueuesPerBuildIdLimit: 3,

// Make sure we don't hit the rate limiter in tests
dynamicconfig.FrontendMaxNamespaceNamespaceReplicationInducingAPIsRPSPerInstance: 1000,
dynamicconfig.FrontendMaxNamespaceNamespaceReplicationInducingAPIsBurstPerInstance: 1000,
dynamicconfig.FrontendNamespaceReplicationInducingAPIsRPS: 1000,

// The dispatch tests below rely on being able to see the effects of changing
// versioning data relatively quickly. In general we only promise to act on new
// versioning data "soon", i.e. after a long poll interval. We can reduce the long poll
Expand Down
9 changes: 7 additions & 2 deletions tests/xdc/user_data_replication_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,13 @@ func TestUserDataReplicationTestSuite(t *testing.T) {
}

func (s *userDataReplicationTestSuite) SetupSuite() {
s.dynamicConfigOverrides = make(map[dynamicconfig.Key]interface{})
s.dynamicConfigOverrides[dynamicconfig.FrontendEnableWorkerVersioningDataAPIs] = true
s.dynamicConfigOverrides = map[dynamicconfig.Key]interface{}{
dynamicconfig.FrontendEnableWorkerVersioningDataAPIs: true,
// Make sure we don't hit the rate limiter in tests
dynamicconfig.FrontendMaxNamespaceNamespaceReplicationInducingAPIsRPSPerInstance: 1000,
dynamicconfig.FrontendMaxNamespaceNamespaceReplicationInducingAPIsBurstPerInstance: 1000,
dynamicconfig.FrontendNamespaceReplicationInducingAPIsRPS: 1000,
}
s.setupSuite([]string{"task_queue_repl_active", "task_queue_repl_standby"})
}

Expand Down

0 comments on commit b4438b1

Please sign in to comment.