citrusframework / citrusframework/citrus

repeatOnError should execute action at least once even if condition is true

Open
#469 1 comment 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.