@@ -195,13 +195,13 @@ void testCancelGetAttempt(boolean withCustomRetrySettings) throws Exception {
195
195
setUp (withCustomRetrySettings );
196
196
for (int executionsCount = 0 ; executionsCount < EXECUTIONS_COUNT ; executionsCount ++) {
197
197
ScheduledExecutorService localExecutor = Executors .newSingleThreadScheduledExecutor ();
198
- final int maxRetries = 100 ;
198
+ final int maxRetries = 20 ;
199
199
200
200
FailingCallable callable = new FailingCallable (maxRetries - 1 , "request" , "SUCCESS" , tracer );
201
201
RetrySettings retrySettings =
202
202
FAST_RETRY_SETTINGS
203
203
.toBuilder ()
204
- .setTotalTimeoutDuration (java .time .Duration .ofMillis (1000L ))
204
+ .setTotalTimeoutDuration (java .time .Duration .ofMillis (5000L ))
205
205
.setMaxAttempts (maxRetries )
206
206
.build ();
207
207
@@ -259,10 +259,11 @@ void testCancelOuterFutureAfterStart() throws Exception {
259
259
.toBuilder ()
260
260
// These params were selected to ensure that future tries to run and fail (at least
261
261
// once) but does not complete before it is cancelled. Assuming no computation time,
262
- // it would take 25 + 100 + 400 + 1000 = 1525ms for the future to complete, which should
262
+ // it would take 2500 + 10000 + 10000 + 10000 = 32500ms for the future to complete,
263
+ // which should
263
264
// be more than enough time to cancel the future.
264
- .setInitialRetryDelayDuration (java .time .Duration .ofMillis (25L ))
265
- .setMaxRetryDelayDuration (java .time .Duration .ofMillis (1000L ))
265
+ .setInitialRetryDelayDuration (java .time .Duration .ofMillis (2500L ))
266
+ .setMaxRetryDelayDuration (java .time .Duration .ofMillis (10000L ))
266
267
.setRetryDelayMultiplier (4.0 )
267
268
.setTotalTimeoutDuration (java .time .Duration .ofMillis (60000L ))
268
269
// Set this test to not use jitter as the randomized retry delay (RRD) may introduce
0 commit comments