Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit 668f83b

Browse files
committed
added another unit test
1 parent e44ac4b commit 668f83b

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/test/java/com/evanlennick/retry4j/CallExecutorTest_RetryOnAnyExcludingTest.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,4 +116,19 @@ public void verifyMultipleExceptions_throwSecondExcludedException() {
116116
new CallExecutor(retryConfig).execute(callable);
117117
}
118118

119+
@Test(expectedExceptions = {RetriesExhaustedException.class})
120+
public void verifyMultipleExceptions_retryOnNotExcludedException() {
121+
Callable<Boolean> callable = () -> {
122+
throw new NullPointerException();
123+
};
124+
125+
RetryConfig retryConfig = retryConfigBuilder
126+
.retryOnAnyExceptionExcluding(IllegalArgumentException.class, UnsupportedOperationException.class)
127+
.withMaxNumberOfTries(5)
128+
.withNoWaitBackoff()
129+
.build();
130+
131+
new CallExecutor(retryConfig).execute(callable);
132+
}
133+
119134
}

0 commit comments

Comments
 (0)