File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -143,7 +143,11 @@ func ValidateAppWrapperConfig(config *AppWrapperConfig) error {
143143 config .FaultTolerance .AdmissionGracePeriod , config .FaultTolerance .GracePeriodMaximum )
144144 }
145145 if config .FaultTolerance .WarmupGracePeriod > config .FaultTolerance .GracePeriodMaximum {
146- return fmt .Errorf ("WarmupGracePeriod %v exceeds GracePeriodCeiling %v" ,
146+ return fmt .Errorf ("AdmissionGracePeriod %v exceeds GracePeriodCeiling %v" ,
147+ config .FaultTolerance .WarmupGracePeriod , config .FaultTolerance .GracePeriodMaximum )
148+ }
149+ if config .FaultTolerance .AdmissionGracePeriod > config .FaultTolerance .WarmupGracePeriod {
150+ return fmt .Errorf ("AdmissionGracePeriod %v exceeds AdmissionGracePeriod %v" ,
147151 config .FaultTolerance .WarmupGracePeriod , config .FaultTolerance .GracePeriodMaximum )
148152 }
149153 if config .FaultTolerance .SuccessTTL <= 0 {
Original file line number Diff line number Diff line change @@ -56,6 +56,9 @@ var _ = Describe("AppWrapper Config", func() {
5656 bad = & FaultToleranceConfig {WarmupGracePeriod : 10 * time .Second , GracePeriodMaximum : 1 * time .Second }
5757 Expect (ValidateAppWrapperConfig (& AppWrapperConfig {FaultTolerance : bad })).ShouldNot (Succeed ())
5858
59+ bad = & FaultToleranceConfig {AdmissionGracePeriod : 10 * time .Second , WarmupGracePeriod : 1 * time .Second }
60+ Expect (ValidateAppWrapperConfig (& AppWrapperConfig {FaultTolerance : bad })).ShouldNot (Succeed ())
61+
5962 bad = & FaultToleranceConfig {SuccessTTL : - 1 * time .Second }
6063 Expect (ValidateAppWrapperConfig (& AppWrapperConfig {FaultTolerance : bad })).ShouldNot (Succeed ())
6164 })
You can’t perform that action at this time.
0 commit comments