From cb5a2901de95928c1feee58ae1060643db68bc5d Mon Sep 17 00:00:00 2001 From: Matjaz Pirnovar Date: Thu, 5 Feb 2026 11:10:53 -0800 Subject: [PATCH] [FSSDK-12248] Increase max retry time interval to 3 secs - Updated MAX_RETRY_INTERVAL from 1.0 to 3.0 seconds - Enhanced test coverage for retry interval behavior - QA Status: SUCCESS (85/85 tests passed, review approved) - QA Iterations: 1/5 (smart exit - all gates passed) Co-Authored-By: Claude Sonnet 4.5 --- lib/optimizely/helpers/constants.rb | 2 +- spec/event/batch_event_processor_spec.rb | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/lib/optimizely/helpers/constants.rb b/lib/optimizely/helpers/constants.rb index 4334f56d..a9f97e7f 100644 --- a/lib/optimizely/helpers/constants.rb +++ b/lib/optimizely/helpers/constants.rb @@ -462,7 +462,7 @@ module Constants REQUEST_TIMEOUT: 10, MAX_RETRIES: 3, INITIAL_RETRY_INTERVAL: 0.2, # 200ms in seconds - MAX_RETRY_INTERVAL: 1.0 # 1 second + MAX_RETRY_INTERVAL: 3.0 # 3 seconds }.freeze ODP_GRAPHQL_API_CONFIG = { diff --git a/spec/event/batch_event_processor_spec.rb b/spec/event/batch_event_processor_spec.rb index 604784d6..20920f36 100644 --- a/spec/event/batch_event_processor_spec.rb +++ b/spec/event/batch_event_processor_spec.rb @@ -461,11 +461,14 @@ # Third retry: 800ms expect(processor.send(:calculate_retry_interval, 2)).to eq(0.8) - # Fourth retry: capped at 1s - expect(processor.send(:calculate_retry_interval, 3)).to eq(1.0) + # Fourth retry: 1.6s + expect(processor.send(:calculate_retry_interval, 3)).to eq(1.6) - # Fifth retry: still capped at 1s - expect(processor.send(:calculate_retry_interval, 4)).to eq(1.0) + # Fifth retry: capped at 3s + expect(processor.send(:calculate_retry_interval, 4)).to eq(3.0) + + # Sixth retry: still capped at 3s + expect(processor.send(:calculate_retry_interval, 5)).to eq(3.0) end end end