Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
6 changes: 3 additions & 3 deletions lib/event_processor/batch_event_processor.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2024-2025, Optimizely
* Copyright 2024-2026, Optimizely
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -33,8 +33,8 @@ import { sprintf } from "../utils/fns";
import { SERVICE_STOPPED_BEFORE_RUNNING } from "../service";
import { Platform } from '../platform_support';

export const DEFAULT_MIN_BACKOFF = 1000;
export const DEFAULT_MAX_BACKOFF = 32000;
export const DEFAULT_MIN_BACKOFF = 200;
export const DEFAULT_MAX_BACKOFF = 1000;
export const MAX_EVENTS_IN_STORE = 500;

export type EventWithId = {
Expand Down
6 changes: 3 additions & 3 deletions lib/event_processor/event_processor_factory.browser.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2024-2025, Optimizely
* Copyright 2024-2026, Optimizely
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -227,10 +227,10 @@ describe('createBatchEventProcessor', () => {
expect(mockGetOpaqueBatchEventProcessor.mock.calls[1][0].batchSize).toBe(undefined);
});

it('uses maxRetries value of 5 by default', () => {
it('uses maxRetries value of 2 by default', () => {
const processor = createBatchEventProcessor({ });
expect(Object.is(processor, mockGetOpaqueBatchEventProcessor.mock.results[0].value)).toBe(true);
expect(mockGetOpaqueBatchEventProcessor.mock.calls[0][0].retryOptions?.maxRetries).toBe(5);
expect(mockGetOpaqueBatchEventProcessor.mock.calls[0][0].retryOptions?.maxRetries).toBe(2);
});

it('uses the provided maxRetries value', () => {
Expand Down
4 changes: 2 additions & 2 deletions lib/event_processor/event_processor_factory.browser.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2024-2025, Optimizely
* Copyright 2024-2026, Optimizely
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -32,7 +32,7 @@ import { DEFAULT_MAX_EVENTS_IN_STORE, EventStore } from './event_store';
import { Platform } from '../platform_support';
export const DEFAULT_EVENT_BATCH_SIZE = 10;
export const DEFAULT_EVENT_FLUSH_INTERVAL = 1_000;
export const EVENT_MAX_RETRIES_BROWSER = 5;
export const EVENT_MAX_RETRIES_BROWSER = 2;

export const createForwardingEventProcessor = (
eventDispatcher: EventDispatcher = defaultEventDispatcher,
Expand Down
6 changes: 3 additions & 3 deletions lib/event_processor/event_processor_factory.node.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2024-2025, Optimizely
* Copyright 2024-2026, Optimizely
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -184,10 +184,10 @@ describe('createBatchEventProcessor', () => {
expect(mockGetOpaqueBatchEventProcessor.mock.calls[1][0].batchSize).toBe(undefined);
});

it('uses maxRetries value of 5 by default', () => {
it('uses maxRetries value of 2 by default', () => {
const processor = createBatchEventProcessor({ });
expect(Object.is(processor, mockGetOpaqueBatchEventProcessor.mock.results[0].value)).toBe(true);
expect(mockGetOpaqueBatchEventProcessor.mock.calls[0][0].retryOptions?.maxRetries).toBe(5);
expect(mockGetOpaqueBatchEventProcessor.mock.calls[0][0].retryOptions?.maxRetries).toBe(2);
});

it('uses the provided maxRetries value', () => {
Expand Down
4 changes: 2 additions & 2 deletions lib/event_processor/event_processor_factory.node.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2024-2025, Optimizely
* Copyright 2024-2026, Optimizely
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -27,7 +27,7 @@ import {
import { Platform } from '../platform_support';
export const DEFAULT_EVENT_BATCH_SIZE = 10;
export const DEFAULT_EVENT_FLUSH_INTERVAL = 30_000;
export const EVENT_MAX_RETRIES_NODE = 5;
export const EVENT_MAX_RETRIES_NODE = 2;

export const createForwardingEventProcessor = (
eventDispatcher: EventDispatcher = defaultEventDispatcher,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2024-2025, Optimizely
* Copyright 2024-2026, Optimizely
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -281,10 +281,10 @@ describe('createBatchEventProcessor', () => {
expect(mockGetOpaqueBatchEventProcessor.mock.calls[1][0].batchSize).toBe(undefined);
});

it('uses maxRetries value of 5 by default', () => {
it('uses maxRetries value of 2 by default', () => {
const processor = createBatchEventProcessor({});
expect(Object.is(processor, mockGetOpaqueBatchEventProcessor.mock.results[0].value)).toBe(true);
expect(mockGetOpaqueBatchEventProcessor.mock.calls[0][0].retryOptions?.maxRetries).toBe(5);
expect(mockGetOpaqueBatchEventProcessor.mock.calls[0][0].retryOptions?.maxRetries).toBe(2);
});

it('uses the provided maxRetries value', () => {
Expand Down
4 changes: 2 additions & 2 deletions lib/event_processor/event_processor_factory.react_native.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2024-2025, Optimizely
* Copyright 2024-2026, Optimizely
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -31,7 +31,7 @@ import { DEFAULT_MAX_EVENTS_IN_STORE, EventStore } from './event_store';
import { Platform } from '../platform_support';
export const DEFAULT_EVENT_BATCH_SIZE = 10;
export const DEFAULT_EVENT_FLUSH_INTERVAL = 1_000;
export const EVENT_MAX_RETRIES_REACT_NATIVE = 5;
export const EVENT_MAX_RETRIES_REACT_NATIVE = 2;

export const createForwardingEventProcessor = (
eventDispatcher: EventDispatcher = defaultEventDispatcher,
Expand Down
8 changes: 4 additions & 4 deletions lib/odp/odp_manager_factory.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2024-2025, Optimizely
* Copyright 2024-2026, Optimizely
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -32,9 +32,9 @@ export const DEFAULT_CACHE_TIMEOUT = 600_000;

export const DEFAULT_EVENT_BATCH_SIZE = 100;
export const DEFAULT_EVENT_FLUSH_INTERVAL = 10_000;
export const DEFAULT_EVENT_MAX_RETRIES = 5;
export const DEFAULT_EVENT_MIN_BACKOFF = 1000;
export const DEFAULT_EVENT_MAX_BACKOFF = 32_000;
export const DEFAULT_EVENT_MAX_RETRIES = 2;
export const DEFAULT_EVENT_MIN_BACKOFF = 200;
export const DEFAULT_EVENT_MAX_BACKOFF = 1_000;

export const INVALID_CACHE = 'Invalid cache';
export const INVALID_CACHE_METHOD = 'Invalid cache method %s';
Expand Down
Loading