test(cli): cover shutdown timer invariants

This commit is contained in:
fz
2026-08-04 11:03:52 +08:00
parent 003d297442
commit 8ea88a589b
3 changed files with 32 additions and 1 deletions

View File

@@ -204,6 +204,7 @@ export class TelemetryOtel extends Telemetry {
try {
await Promise.race([providerShutdown, deadline])
} finally {
/* v8 ignore else -- the Promise executor assigns timer synchronously before this race starts. */
if (timer !== undefined) clearTimeout(timer)
}
}