From 42661b111ff0b3ab9296d68c702ab9d4107489bb Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Sun, 8 Nov 2026 23:14:55 +0100 Subject: [PATCH] Flush the logger in the OTLP export test, since @larvit/log 2.4.0 batches records --- src/logger.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/logger.test.ts b/src/logger.test.ts index 833afcd..b1c3e79 100644 --- a/src/logger.test.ts +++ b/src/logger.test.ts @@ -56,7 +56,7 @@ test("createLogger: a set endpoint actually exports log records over OTLP/HTTP", try { const log = createLogger({ otlpEndpoint: "http://collector:4318", stderr: () => {}, stdout: () => {} }); log.info("exported"); - await new Promise((r) => setTimeout(r, 50)); // export is fire-and-forget in the background + await log.flush(); // the queue batches records for up to a second } finally { globalThis.fetch = orig; }