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 = {