Skip to content

Commit

Permalink
Validation error for linear retry duration
Browse files Browse the repository at this point in the history
  • Loading branch information
Amit-CloudSufi committed Dec 12, 2024
1 parent 5712df2 commit e612cd0
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,12 @@ public void validate(FailureCollector collector) {
.withConfigProperty(MESSAGE_FORMAT);
}

if (!containsMacro(PROPERTY_LINEAR_RETRY_INTERVAL) && Objects.nonNull(linearRetryInterval)
&& linearRetryInterval < 0) {
collector.addFailure("Linear Retry Interval cannot be a negative number.", null)
.withConfigProperty(PROPERTY_LINEAR_RETRY_INTERVAL);
}

if (!containsMacro(PROPERTY_MAX_RETRY_DURATION) && Objects.nonNull(maxRetryDuration) && maxRetryDuration < 0) {
collector.addFailure("Max Retry Duration cannot be a negative number.", null)
.withConfigProperty(PROPERTY_MAX_RETRY_DURATION);
Expand Down

0 comments on commit e612cd0

Please sign in to comment.