diff --git a/plugin-server/src/utils/retries.ts b/plugin-server/src/utils/retries.ts index ec28686daa3152..45c6d96ed189a3 100644 --- a/plugin-server/src/utils/retries.ts +++ b/plugin-server/src/utils/retries.ts @@ -158,7 +158,7 @@ export async function runRetriableFunction(retriableFunctionPayload: RetriableFu /** * Retry a function, respecting `error.isRetriable`. */ -export async function retryIfRetriable(fn: () => Promise, retries = 3, sleepMs = 500): Promise { +export async function retryIfRetriable(fn: () => Promise, retries = 2, sleepMs = 500): Promise { for (let i = 0; i < retries; i++) { try { return await fn() diff --git a/plugin-server/tests/main/ingestion-queues/each-batch.test.ts b/plugin-server/tests/main/ingestion-queues/each-batch.test.ts index 19b43173340352..c1ae53e174724d 100644 --- a/plugin-server/tests/main/ingestion-queues/each-batch.test.ts +++ b/plugin-server/tests/main/ingestion-queues/each-batch.test.ts @@ -535,7 +535,6 @@ describe('eachBatchX', () => { runEventPipelineSpy .mockImplementationOnce(() => Promise.reject('runEventPipeline nopes out')) .mockImplementationOnce(() => Promise.reject('runEventPipeline nopes out')) - .mockImplementationOnce(() => Promise.reject('runEventPipeline nopes out')) await expect(eachBatchParallelIngestion(batch, queue, IngestionOverflowMode.Disabled)).rejects.toBe( 'runEventPipeline nopes out' )