From 83a1462334043cf93d1564ab4b7cde9fa2dd0458 Mon Sep 17 00:00:00 2001 From: Mayur Kale Date: Mon, 21 Oct 2019 11:26:39 -0700 Subject: [PATCH] fix: batchSpanProcessor test failing intermittently --- .../test/export/BatchSpanProcessor.test.ts | 4 ++++ 1 file changed, 4 insertions(+) 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 => {