Closed pun-ky closed 5 years ago
Hi, I would think also about something like this:
step("xxx") {
rerunOnFail = true // exists
retryWhen {
condition {
(aem.bundles == valid) && (operationStatusValidationResult == 500)
}
times(5)
}
}
Example: The step calls the HTTP endpoint to modify some value, let say: update some counter.
The requested HTTP endpoint has timed out. A timeout signals that something took to much time, but it does not mean that your operation failed.
To confirm the counter state, your logic requests other endpoint and checks its status.
I think that all retry related features could be implemented as a part of step action
action {
instanceActions.awaitUp { instances = listOf(this) } // throws exception when e.g bundles are not up; yours 'retryWhen()'
retry { afterSquaredSecond(5) }.withCountdown<Unit, Exception> {
// do anything
}
}
released in 7.2.2
thx @tomaszmichalak for reporting this
consider impl