planCheckBudget returns the effective poll budget, allowing tests to override.
()
| 339 | |
| 340 | // planCheckBudget returns the effective poll budget, allowing tests to override. |
| 341 | func (s *Server) planCheckBudget() time.Duration { |
| 342 | if s.planCheckPollBudgetOverride > 0 { |
| 343 | return s.planCheckPollBudgetOverride |
| 344 | } |
| 345 | return planCheckPollBudget |
| 346 | } |
| 347 | |
| 348 | // runPlanChecks triggers plan checks and polls for results within the poll budget. |
| 349 | func (s *Server) runPlanChecks(ctx context.Context, planName string) *PlanCheckInfo { |