Skip to content

Commit

Permalink
Validation in the catch block no longer triggers error
Browse files Browse the repository at this point in the history
  • Loading branch information
mancze committed Mar 21, 2024
1 parent f157724 commit e311721
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/test/java/com/example/ValidatorTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@ public class ValidatorTest {
void BUG_REPRODUCTION_CASE_validateValidBean_shouldNotFail() {
var bean = new ValidatedBean("foobar", 42);

assertThat(validator.validate(bean)).isEmpty();
try {
assertThat(validator.validate(bean)).isEmpty();
} catch (Exception e) {
// retry
assertThat(validator.validate(bean)).isEmpty();
}
}

@Test
Expand Down

0 comments on commit e311721

Please sign in to comment.