From 284829683c80837ef2c84411b1321299a0c7c4a1 Mon Sep 17 00:00:00 2001 From: Mayur Kale Date: Mon, 21 Oct 2019 16:57:58 -0700 Subject: [PATCH] fix: batchSpanProcessor test failing intermittently (#444) --- .../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 => {