1717
1818package org .openqa .selenium .remote .http ;
1919
20- import static com .google .common .net .HttpHeaders .CONTENT_LENGTH ;
21- import static java .net .HttpURLConnection .HTTP_INTERNAL_ERROR ;
22- import static java .net .HttpURLConnection .HTTP_UNAVAILABLE ;
23- import static org .openqa .selenium .internal .Debug .getDebugLogLevel ;
20+ import org .openqa .selenium .TimeoutException ;
2421
2522import dev .failsafe .Failsafe ;
2623import dev .failsafe .RetryPolicy ;
2724
28- import org .openqa .selenium .TimeoutException ;
29-
3025import java .net .ConnectException ;
31- import java .time .temporal .ChronoUnit ;
3226import java .util .logging .Logger ;
3327
28+ import static com .google .common .net .HttpHeaders .CONTENT_LENGTH ;
29+ import static java .net .HttpURLConnection .HTTP_INTERNAL_ERROR ;
30+ import static java .net .HttpURLConnection .HTTP_UNAVAILABLE ;
31+ import static org .openqa .selenium .internal .Debug .getDebugLogLevel ;
32+
3433public class RetryRequest implements Filter {
3534
3635 private static final Logger LOG = Logger .getLogger (RetryRequest .class .getName ());
@@ -39,7 +38,6 @@ public class RetryRequest implements Filter {
3938 private static final RetryPolicy <Object > connectionFailurePolicy =
4039 RetryPolicy .builder ()
4140 .handleIf (failure -> failure .getCause () instanceof ConnectException )
42- .withBackoff (1 , 4 , ChronoUnit .SECONDS )
4341 .withMaxRetries (3 )
4442 .onRetry (e -> LOG .log (
4543 getDebugLogLevel (),
@@ -51,7 +49,6 @@ public class RetryRequest implements Filter {
5149 private static final RetryPolicy <Object > readTimeoutPolicy =
5250 RetryPolicy .builder ()
5351 .handle (TimeoutException .class )
54- .withBackoff (1 , 4 , ChronoUnit .SECONDS )
5552 .withMaxRetries (3 )
5653 .onRetry (e -> LOG .log (
5754 getDebugLogLevel (),
@@ -65,7 +62,6 @@ public class RetryRequest implements Filter {
6562 .handleResultIf (response -> ((HttpResponse )response ).getStatus () == HTTP_INTERNAL_ERROR &&
6663 Integer .parseInt (((HttpResponse )response ).getHeader (CONTENT_LENGTH )) == 0 )
6764 .handleResultIf (response -> ((HttpResponse )response ).getStatus () == HTTP_UNAVAILABLE )
68- .withBackoff (1 , 2 , ChronoUnit .SECONDS )
6965 .withMaxRetries (2 )
7066 .onRetry (e -> LOG .log (
7167 getDebugLogLevel (),
0 commit comments