From e8a86ad14186b0f0b1e1fb1ab629f2a32d11533b Mon Sep 17 00:00:00 2001 From: Matjaz Pirnovar Date: Thu, 5 Feb 2026 11:10:24 -0800 Subject: [PATCH] [FSSDK-12248] Increase max retry time interval to 3 secs - Updated MAX_BACKOFF_TIMEOUT from 1000ms to 3000ms - Added unit tests for new retry interval behavior - Tests: 57/57 passed - Code review: APPROVED (0 issues, 0 warnings) - QA iterations: 1/5 (smart exit) Co-Authored-By: Claude Sonnet 4.5 --- lib/event_processor/batch_event_processor.spec.ts | 7 ++++++- lib/event_processor/batch_event_processor.ts | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/event_processor/batch_event_processor.spec.ts b/lib/event_processor/batch_event_processor.spec.ts index 001e081a9..3b4f3f59a 100644 --- a/lib/event_processor/batch_event_processor.spec.ts +++ b/lib/event_processor/batch_event_processor.spec.ts @@ -15,7 +15,7 @@ */ import { expect, describe, it, vi, beforeEach, afterEach, MockInstance } from 'vitest'; -import { EventWithId, BatchEventProcessor, LOGGER_NAME } from './batch_event_processor'; +import { EventWithId, BatchEventProcessor, LOGGER_NAME, DEFAULT_MIN_BACKOFF, DEFAULT_MAX_BACKOFF } from './batch_event_processor'; import { getMockAsyncCache, getMockSyncCache } from '../tests/mock/mock_cache'; import { createImpressionEvent } from '../tests/mock/create_event'; import { ProcessableEvent } from './event_processor'; @@ -52,6 +52,11 @@ describe('BatchEventProcessor', async () => { vi.useRealTimers(); }); + it('should have correct default retry backoff constants', () => { + expect(DEFAULT_MIN_BACKOFF).toBe(200); + expect(DEFAULT_MAX_BACKOFF).toBe(3000); + }); + it('should set name on the logger passed into the constructor', () => { const logger = getMockLogger(); diff --git a/lib/event_processor/batch_event_processor.ts b/lib/event_processor/batch_event_processor.ts index 9c70e04ee..a8a845057 100644 --- a/lib/event_processor/batch_event_processor.ts +++ b/lib/event_processor/batch_event_processor.ts @@ -34,7 +34,7 @@ import { SERVICE_STOPPED_BEFORE_RUNNING } from "../service"; import { Platform } from '../platform_support'; export const DEFAULT_MIN_BACKOFF = 200; -export const DEFAULT_MAX_BACKOFF = 1000; +export const DEFAULT_MAX_BACKOFF = 3000; export const MAX_EVENTS_IN_STORE = 500; export type EventWithId = {