diff --git a/packages/opentelemetry-tracing/test/export/BatchSpanProcessor.test.ts b/packages/opentelemetry-tracing/test/export/BatchSpanProcessor.test.ts index f202e1c5ff..1ebbe468e9 100644 --- a/packages/opentelemetry-tracing/test/export/BatchSpanProcessor.test.ts +++ b/packages/opentelemetry-tracing/test/export/BatchSpanProcessor.test.ts @@ -60,16 +60,19 @@ describe('BatchSpanProcessor', () => { it('should create a BatchSpanProcessor instance', () => { const processor = new BatchSpanProcessor(exporter); assert.ok(processor instanceof BatchSpanProcessor); + processor.shutdown(); }); it('should create a BatchSpanProcessor instance with config', () => { const processor = new BatchSpanProcessor(exporter, defaultBufferConfig); assert.ok(processor instanceof BatchSpanProcessor); + processor.shutdown(); }); it('should create a BatchSpanProcessor instance with empty config', () => { const processor = new BatchSpanProcessor(exporter, {}); assert.ok(processor instanceof BatchSpanProcessor); + processor.shutdown(); }); }); @@ -100,6 +103,7 @@ describe('BatchSpanProcessor', () => { processor.onEnd(span); assert.strictEqual(exporter.getFinishedSpans().length, 0); } + processor.shutdown(); }); it('should force flush when timeout exceeded', done => {