File tree 2 files changed +8
-1
lines changed
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 {
143
143
config .FaultTolerance .AdmissionGracePeriod , config .FaultTolerance .GracePeriodMaximum )
144
144
}
145
145
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" ,
147
151
config .FaultTolerance .WarmupGracePeriod , config .FaultTolerance .GracePeriodMaximum )
148
152
}
149
153
if config .FaultTolerance .SuccessTTL <= 0 {
Original file line number Diff line number Diff line change @@ -56,6 +56,9 @@ var _ = Describe("AppWrapper Config", func() {
56
56
bad = & FaultToleranceConfig {WarmupGracePeriod : 10 * time .Second , GracePeriodMaximum : 1 * time .Second }
57
57
Expect (ValidateAppWrapperConfig (& AppWrapperConfig {FaultTolerance : bad })).ShouldNot (Succeed ())
58
58
59
+ bad = & FaultToleranceConfig {AdmissionGracePeriod : 10 * time .Second , WarmupGracePeriod : 1 * time .Second }
60
+ Expect (ValidateAppWrapperConfig (& AppWrapperConfig {FaultTolerance : bad })).ShouldNot (Succeed ())
61
+
59
62
bad = & FaultToleranceConfig {SuccessTTL : - 1 * time .Second }
60
63
Expect (ValidateAppWrapperConfig (& AppWrapperConfig {FaultTolerance : bad })).ShouldNot (Succeed ())
61
64
})
You can’t perform that action at this time.
0 commit comments