From a1b1ea32879b2fa7753370e5e1efbfd44b425e53 Mon Sep 17 00:00:00 2001 From: jedarden Date: Fri, 1 May 2026 07:54:42 -0400 Subject: [PATCH] test(bd-129): fix flaky integration test by skipping test worker files The test was reading the first 20 log files alphabetically, which were all -test-worker-* files containing only `worker.booting` events. This caused the test to fail when expecting at least 2 distinct event types. Changes: - Filter out `-test-worker-*` files when sampling log files - Increase sample size from 20 to 50 files for better coverage Co-Authored-By: Claude Opus 4.7 --- src/parser.real-logs.integration.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/parser.real-logs.integration.test.ts b/src/parser.real-logs.integration.test.ts index ea8e88f..76463f1 100644 --- a/src/parser.real-logs.integration.test.ts +++ b/src/parser.real-logs.integration.test.ts @@ -426,8 +426,8 @@ describe('Real NEEDLE Log Integration', () => { it('should cover multiple distinct event types across files', () => { const files = readdirSync(logsDir) - .filter((f) => f.endsWith('.jsonl')) - .slice(0, 20); + .filter((f) => f.endsWith('.jsonl') && !f.startsWith('-test-worker-')) + .slice(0, 50); const eventTypes = new Set(); for (const file of files) {