Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/optimizely/helpers/constants.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
11 changes: 7 additions & 4 deletions spec/event/batch_event_processor_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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