citrusframework / citrusframework/citrus
repeatOnError should execute action at least once even if condition is true
Open
enhancement
prio-low
- Dominant language
- Java
- Stars
- 485
- Forks
- 155
- Avg merge
- 4d 22h
- Merged PRs (30d)
- 6
Description
**Citrus Version**
2.7.6
**Expected behavior**
`repeatOnError().until(true).action(errorThrowingAction)` should execute `errorThrowingAction` exactly once, causing the test to fail
**Actual behavior**
`errorThrowingAction` is not executed (because the repeat-until condition is evaluated first), causing the test to succeed
**Background**
A simple boolean error in the repeat-until condition can make a test false-positive. As the method is called *repeat*OnError, I would expect the condition only to be evaluated for repetitions, not the initial execution.
Contributor guide
Assessment
This issue has not been assessed yet.