MKT-7001: formatting
This commit is contained in:
parent
5b4fc0d6f3
commit
f5bb9479b4
@ -29,10 +29,8 @@ class RetryCompletableFutureUnitTest {
|
|||||||
|
|
||||||
CompletableFuture<Integer> result = retryTask(codeToRun, 10);
|
CompletableFuture<Integer> result = retryTask(codeToRun, 10);
|
||||||
|
|
||||||
assertThat(result.join())
|
assertThat(result.join()).isEqualTo(100);
|
||||||
.isEqualTo(100);
|
assertThat(retriesCounter).hasValue(4);
|
||||||
assertThat(retriesCounter)
|
|
||||||
.hasValue(4);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -52,10 +50,8 @@ class RetryCompletableFutureUnitTest {
|
|||||||
|
|
||||||
CompletableFuture<Integer> result = retryUnsafe(codeToRun, 10);
|
CompletableFuture<Integer> result = retryUnsafe(codeToRun, 10);
|
||||||
|
|
||||||
assertThat(result.join())
|
assertThat(result.join()).isEqualTo(100);
|
||||||
.isEqualTo(100);
|
assertThat(retriesCounter).hasValue(4);
|
||||||
assertThat(retriesCounter)
|
|
||||||
.hasValue(4);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -65,8 +61,8 @@ class RetryCompletableFutureUnitTest {
|
|||||||
CompletableFuture<Integer> result = retryUnsafe(codeToRun, 3);
|
CompletableFuture<Integer> result = retryUnsafe(codeToRun, 3);
|
||||||
|
|
||||||
assertThatThrownBy(result::join)
|
assertThatThrownBy(result::join)
|
||||||
.isInstanceOf(CompletionException.class)
|
.isInstanceOf(CompletionException.class)
|
||||||
.hasMessageContaining("RuntimeException: task failed for 3 time(s)");
|
.hasMessageContaining("RuntimeException: task failed for 3 time(s)");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -75,10 +71,8 @@ class RetryCompletableFutureUnitTest {
|
|||||||
|
|
||||||
CompletableFuture<Integer> result = retryExceptionallyAsync(codeToRun, 10);
|
CompletableFuture<Integer> result = retryExceptionallyAsync(codeToRun, 10);
|
||||||
|
|
||||||
assertThat(result.join())
|
assertThat(result.join()).isEqualTo(100);
|
||||||
.isEqualTo(100);
|
assertThat(retriesCounter).hasValue(4);
|
||||||
assertThat(retriesCounter)
|
|
||||||
.hasValue(4);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -88,7 +82,7 @@ class RetryCompletableFutureUnitTest {
|
|||||||
CompletableFuture<Integer> result = retryExceptionallyAsync(codeToRun, 3);
|
CompletableFuture<Integer> result = retryExceptionallyAsync(codeToRun, 3);
|
||||||
|
|
||||||
assertThatThrownBy(result::join)
|
assertThatThrownBy(result::join)
|
||||||
.isInstanceOf(CompletionException.class)
|
.isInstanceOf(CompletionException.class)
|
||||||
.hasMessageContaining("RuntimeException: task failed for 3 time(s)");
|
.hasMessageContaining("RuntimeException: task failed for 3 time(s)");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -98,10 +92,8 @@ class RetryCompletableFutureUnitTest {
|
|||||||
|
|
||||||
CompletableFuture<Integer> result = retryNesting(codeToRun, 10);
|
CompletableFuture<Integer> result = retryNesting(codeToRun, 10);
|
||||||
|
|
||||||
assertThat(result.join())
|
assertThat(result.join()).isEqualTo(100);
|
||||||
.isEqualTo(100);
|
assertThat(retriesCounter).hasValue(4);
|
||||||
assertThat(retriesCounter)
|
|
||||||
.hasValue(4);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -111,7 +103,7 @@ class RetryCompletableFutureUnitTest {
|
|||||||
CompletableFuture<Integer> result = retryNesting(codeToRun, 3);
|
CompletableFuture<Integer> result = retryNesting(codeToRun, 3);
|
||||||
|
|
||||||
assertThatThrownBy(result::join)
|
assertThatThrownBy(result::join)
|
||||||
.isInstanceOf(CompletionException.class)
|
.isInstanceOf(CompletionException.class)
|
||||||
.hasMessageContaining("RuntimeException: task failed for 3 time(s)");
|
.hasMessageContaining("RuntimeException: task failed for 3 time(s)");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user