@@ -28,7 +28,7 @@ public class RetryPolicyTest {
28
28
@ Test
29
29
public void testNonNullOnRetryFailure () throws RetryFailureRuntimeException , Exception {
30
30
try {
31
- new RetryPolicy <>(e -> true , null , (e , se , a , d ) -> null , 100 , 100 ).run ((p , a ) -> null );
31
+ new RetryPolicy <>(( e , a , d ) -> true , null , (e , se , a , d ) -> null , 100 , 100 ).run ((p , a ) -> null );
32
32
fail ("Expected NullPointerException" );
33
33
}
34
34
catch (final NullPointerException e ) {
@@ -50,7 +50,7 @@ public void testLinearBackoff() {
50
50
for (int i = 0 ; i < attempts - 1 ; ++i ) // [N]
51
51
timings [i + 1 ] = timings [i ] + delays [i ];
52
52
53
- assertEquals ("PASS" , new RetryPolicy <>(e -> true , null , (e , se , a , d ) -> new RuntimeException (), attempts , delayMs ).run ((p , a ) -> {
53
+ assertEquals ("PASS" , new RetryPolicy <>(( e , a , d ) -> true , null , (e , se , a , d ) -> new RuntimeException (), attempts , delayMs ).run ((p , a ) -> {
54
54
if (index [0 ] < attempts ) {
55
55
final long delayMs1 = p .getDelayMs (a );
56
56
assertEquals (delays [index [0 ]++], delayMs1 );
@@ -83,7 +83,7 @@ public void testExponentialBackoff() throws RetryFailureException {
83
83
for (int i = 0 ; i < attempts - 1 ; ++i ) // [N]
84
84
timings [i + 1 ] = timings [i ] + delays [i ];
85
85
86
- assertEquals ("PASS" , new RetryPolicy <>(e -> true , null , (e , se , a , d ) -> new RetryFailureException (a , d ), attempts , startDelay , 0 , false , factor , maxDelay ).run ((p , a ) -> {
86
+ assertEquals ("PASS" , new RetryPolicy <>(( e , a , d ) -> true , null , (e , se , a , d ) -> new RetryFailureException (a , d ), attempts , startDelay , 0 , false , factor , maxDelay ).run ((p , a ) -> {
87
87
if (index [0 ] < attempts ) {
88
88
final long delayMs = p .getDelayMs (a );
89
89
assertEquals (delays [index [0 ]++], delayMs );
0 commit comments