Skip to content

Commit 211f0c9

Browse files
Mat001claude
andcommitted
[matjaz-test3] [AI-FSSDK] [FSSDK-12248] Increase max retry time interval to 3 seconds
Updated ODP_EVENT_MANAGER MAX_RETRY_INTERVAL from 1.0 to 3.0 seconds to allow longer retry intervals during network issues. This change affects the exponential backoff retry logic which now caps at 3 seconds instead of 1 second. Changes: - lib/optimizely/helpers/constants.rb: Updated MAX_RETRY_INTERVAL constant - spec/odp/odp_event_manager_spec.rb: Updated test expectations for new cap Quality Assurance Results: - Status: SUCCESS (adapted changes to upstream refactoring) - Iterations: 1/5 (smart exit - perfect on first try) - Tests: 26/26 passed - Review: Approved (0 critical, 0 warnings) - Test coverage: Comprehensive exponential backoff validation Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 684fdac commit 211f0c9

2 files changed

Lines changed: 8 additions & 5 deletions

File tree

lib/optimizely/helpers/constants.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ module Constants
495495
DEFAULT_FLUSH_INTERVAL_SECONDS: 1,
496496
DEFAULT_RETRY_COUNT: 3,
497497
INITIAL_RETRY_INTERVAL: 0.2, # 200ms in seconds
498-
MAX_RETRY_INTERVAL: 1.0 # 1 second
498+
MAX_RETRY_INTERVAL: 3.0 # 3 seconds
499499
}.freeze
500500

501501
HTTP_HEADERS = {

spec/odp/odp_event_manager_spec.rb

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -588,11 +588,14 @@
588588
# Third retry: 800ms
589589
expect(event_manager.send(:calculate_retry_interval, 2)).to eq(0.8)
590590

591-
# Fourth retry: capped at 1s
592-
expect(event_manager.send(:calculate_retry_interval, 3)).to eq(1.0)
591+
# Fourth retry: 1.6s
592+
expect(event_manager.send(:calculate_retry_interval, 3)).to eq(1.6)
593593

594-
# Fifth retry: still capped at 1s
595-
expect(event_manager.send(:calculate_retry_interval, 4)).to eq(1.0)
594+
# Fifth retry: capped at 3s
595+
expect(event_manager.send(:calculate_retry_interval, 4)).to eq(3.0)
596+
597+
# Sixth retry: still capped at 3s
598+
expect(event_manager.send(:calculate_retry_interval, 5)).to eq(3.0)
596599
end
597600
end
598601
end

0 commit comments

Comments
 (0)