Skip to content

Commit a3745ba

Browse files
chore: update otel test to check for new spans
1 parent 3544bfe commit a3745ba

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

packages/test/src/test-otel.ts

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ if (RUN_INTEGRATION_TESTS) {
251251
resource: staticResource,
252252
traceExporter,
253253
});
254-
await otel.start();
254+
otel.start();
255255

256256
const sinks: InjectedSinks<OpenTelemetrySinks> = {
257257
exporter: makeWorkflowExporter(traceExporter, staticResource),
@@ -379,6 +379,19 @@ if (RUN_INTEGRATION_TESTS) {
379379
);
380380
t.true(activityStartedSignalSpan !== undefined);
381381

382+
const timerSpan = spans.find(
383+
({ name, parentSpanId }) =>
384+
name === SpanName.WORKFLOW_TIMER && parentSpanId === parentExecuteSpan?.spanContext().spanId
385+
);
386+
t.true(timerSpan !== undefined);
387+
388+
const querySpan = spans.find(
389+
({ name, parentSpanId }) =>
390+
name === `${SpanName.WORKFLOW_QUERY}${SPAN_DELIMITER}step` &&
391+
parentSpanId === secondActivityExecuteSpan?.spanContext().spanId
392+
);
393+
t.true(querySpan !== undefined);
394+
382395
t.deepEqual(new Set(spans.map((span) => span.spanContext().traceId)).size, 1);
383396
} finally {
384397
// Cleanup the runtime so that it doesn't interfere with other tests

0 commit comments

Comments
 (0)