Flush the logger in the OTLP export test, since @larvit/log 2.4.0 batches records
CI / full-gate (push) Successful in 3m51s
Mirror / github-mirror (push) Successful in 3s

This commit was merged in pull request #136.
This commit is contained in:
2026-11-08 23:14:55 +01:00
parent ecdf9f3464
commit 42661b111f
+1 -1
View File
@@ -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;
}