Skip to content

Commit abf1134

Browse files
history creation code
1 parent 09a9316 commit abf1134

File tree

1 file changed

+1
-79
lines changed

1 file changed

+1
-79
lines changed

packages/test/src/test-otel.ts

Lines changed: 1 addition & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import {
2424
import { OpenTelemetrySinks, SpanName, SPAN_DELIMITER } from '@temporalio/interceptors-opentelemetry/lib/workflow';
2525
import { DefaultLogger, InjectedSinks, Runtime } from '@temporalio/worker';
2626
import * as activities from './activities';
27-
import { loadHistory, RUN_INTEGRATION_TESTS, saveHistory, TestWorkflowEnvironment, Worker } from './helpers';
27+
import { loadHistory, RUN_INTEGRATION_TESTS, TestWorkflowEnvironment, Worker } from './helpers';
2828
import * as workflows from './workflows';
2929
import { createTestWorkflowBundle } from './helpers-integration';
3030

@@ -513,45 +513,6 @@ if (RUN_INTEGRATION_TESTS) {
513513
}
514514

515515
test('Can replay otel history from 1.11.3', async (t) => {
516-
/*
517-
const staticResource = new opentelemetry.resources.Resource({
518-
[SemanticResourceAttributes.SERVICE_NAME]: 'ts-test-otel-worker',
519-
});
520-
const worker = await Worker.create({
521-
workflowsPath: require.resolve('./workflows/signal-start-otel'),
522-
activities: {
523-
a: async () => 'a',
524-
b: async () => 'b',
525-
c: async () => 'c',
526-
},
527-
taskQueue: 'test-otel-inbound',
528-
sinks: {
529-
exporter: makeWorkflowExporter(new InMemorySpanExporter(), staticResource),
530-
},
531-
interceptors: {
532-
workflowModules: [require.resolve('./workflows/signal-start-otel')],
533-
activity: [
534-
(ctx) => ({
535-
inbound: new OpenTelemetryActivityInboundInterceptor(ctx),
536-
}),
537-
],
538-
},
539-
});
540-
const client = new WorkflowClient();
541-
542-
const result = await worker.runUntil(async () => {
543-
const handle = await client.signalWithStart(workflows.signalStartOtel, {
544-
signal: workflows.startSignal,
545-
taskQueue: 'test-otel-inbound',
546-
workflowId: uuid4(),
547-
});
548-
const result = await handle.result();
549-
const history = await handle.fetchHistory();
550-
await saveHistory('otel_current.json', history);
551-
return result;
552-
});
553-
*/
554-
555516
const hist = await loadHistory('otel_1_11_3.json');
556517
await t.notThrowsAsync(async () => {
557518
await Worker.runReplayHistory(
@@ -575,45 +536,6 @@ test('Can replay otel history from 1.11.3', async (t) => {
575536
});
576537

577538
test('Can replay otel history from 1.13.1', async (t) => {
578-
/*
579-
const staticResource = new opentelemetry.resources.Resource({
580-
[SemanticResourceAttributes.SERVICE_NAME]: 'ts-test-otel-worker',
581-
});
582-
const worker = await Worker.create({
583-
workflowsPath: require.resolve('./workflows/signal-start-otel'),
584-
activities: {
585-
a: async () => 'a',
586-
b: async () => 'b',
587-
c: async () => 'c',
588-
},
589-
taskQueue: 'test-otel-inbound-curr',
590-
sinks: {
591-
exporter: makeWorkflowExporter(new InMemorySpanExporter(), staticResource),
592-
},
593-
interceptors: {
594-
workflowModules: [require.resolve('./workflows/signal-start-otel')],
595-
activity: [
596-
(ctx) => ({
597-
inbound: new OpenTelemetryActivityInboundInterceptor(ctx),
598-
}),
599-
],
600-
},
601-
});
602-
const client = new WorkflowClient();
603-
604-
const result = await worker.runUntil(async () => {
605-
const handle = await client.signalWithStart(workflows.signalStartOtel, {
606-
signal: workflows.startSignal,
607-
taskQueue: 'test-otel-inbound-curr',
608-
workflowId: uuid4(),
609-
});
610-
const result = await handle.result();
611-
const history = await handle.fetchHistory();
612-
await saveHistory('otel_1_13_1.json', history);
613-
return result;
614-
});
615-
*/
616-
617539
const hist = await loadHistory('otel_1_13_1.json');
618540
await t.notThrowsAsync(async () => {
619541
await Worker.runReplayHistory(

0 commit comments

Comments
 (0)