Skip to content

Commit d2f6cd9

Browse files
saravmajesticclaude
andcommitted
test(observability): start a fresh telemetry generation in trace envelope tests
An earlier test file can leave telemetry initialised but disabled, making `init()` a no-op that drops events, so the envelope test failed depending on file order. Shut down before init, as the telemetry suite does. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
1 parent a6c9765 commit d2f6cd9

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎packages/opencode/test/altimate/trace-context.test.ts‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,9 @@ describe("TraceContext in telemetry envelopes", () => {
132132
try {
133133
delete process.env.ALTIMATE_TELEMETRY_DISABLED
134134
process.env.APPLICATIONINSIGHTS_CONNECTION_STRING = "InstrumentationKey=trace-test;IngestionEndpoint=https://example.com"
135+
// A generation an earlier test file left initialised (disabled, without a sink) would make
136+
// init() a no-op that drops every event; start a fresh one.
137+
await Telemetry.shutdown()
135138
await Telemetry.init()
136139
track()
137140
await Telemetry.flush()

0 commit comments

Comments
 (0)