From 85ec4d731476e0590c35bf5ac45f4c63649af691 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20Adel=C3=B6w?= Date: Tue, 10 Mar 2026 20:12:49 +0100 Subject: [PATCH] fix: remove tautological assertion in burst length test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace the self-referencing callCount assertion with a concrete expected value of 3, derived from the mocked time progression. Co-Authored-By: Claude Opus 4.6 Signed-off-by: Fredrik Adelöw --- .../src/engine/IncrementalIngestionEngine.test.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/plugins/catalog-backend-module-incremental-ingestion/src/engine/IncrementalIngestionEngine.test.ts b/plugins/catalog-backend-module-incremental-ingestion/src/engine/IncrementalIngestionEngine.test.ts index efcaa44dc1..8b74e19755 100644 --- a/plugins/catalog-backend-module-incremental-ingestion/src/engine/IncrementalIngestionEngine.test.ts +++ b/plugins/catalog-backend-module-incremental-ingestion/src/engine/IncrementalIngestionEngine.test.ts @@ -110,11 +110,12 @@ describe('IncrementalIngestionEngine - Burst Length', () => { const result = await engine.ingestOneBurst('test-ingestion', signal); - // After 3 calls: time is 1120, elapsed is 120 > 100ms burst length - // The burst check happens after the 3rd call, so we get 3 calls + // Call 1: time=1040, elapsed=40 < 100 → continue + // Call 2: time=1080, elapsed=80 < 100 → continue + // Call 3: time=1120, elapsed=120 > 100 → stop expect(result).toBe(false); - expect(mockProvider.next).toHaveBeenCalledTimes(callCount); - expect(callCount).toBeGreaterThan(1); + expect(mockProvider.next).toHaveBeenCalledTimes(3); + expect(callCount).toBe(3); }); it('should complete burst normally when provider returns done before burst length', async () => {