BAEL-7001: fixed formatting
This commit is contained in:
parent
06943519f8
commit
210eaf2c0b
|
@ -1,16 +1,19 @@
|
|||
package com.baeldung.concurrent.completablefuture.retry;
|
||||
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import static com.baeldung.concurrent.completablefuture.retry.RetryCompletableFuture.retryExceptionallyAsync;
|
||||
import static com.baeldung.concurrent.completablefuture.retry.RetryCompletableFuture.retryNesting;
|
||||
import static com.baeldung.concurrent.completablefuture.retry.RetryCompletableFuture.retryTask;
|
||||
import static com.baeldung.concurrent.completablefuture.retry.RetryCompletableFuture.retryUnsafe;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.assertThatThrownBy;
|
||||
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.concurrent.CompletionException;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
import static com.baeldung.concurrent.completablefuture.retry.RetryCompletableFuture.*;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.assertThatThrownBy;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class RetryCompletableFutureUnitTest {
|
||||
private AtomicInteger retriesCounter = new AtomicInteger(0);
|
||||
|
@ -38,8 +41,7 @@ class RetryCompletableFutureUnitTest {
|
|||
|
||||
CompletableFuture<Integer> result = retryTask(codeToRun, 3);
|
||||
|
||||
assertThatThrownBy(result::join)
|
||||
.isInstanceOf(CompletionException.class)
|
||||
assertThatThrownBy(result::join).isInstanceOf(CompletionException.class)
|
||||
.hasMessageContaining("IllegalStateException: Task failed after 3 attempts");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue