Skip to content

Commit 2848296

Browse files
authored
fix: batchSpanProcessor test failing intermittently (#444)
1 parent dc4ed28 commit 2848296

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/opentelemetry-tracing/test/export/BatchSpanProcessor.test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,16 +60,19 @@ describe('BatchSpanProcessor', () => {
6060
it('should create a BatchSpanProcessor instance', () => {
6161
const processor = new BatchSpanProcessor(exporter);
6262
assert.ok(processor instanceof BatchSpanProcessor);
63+
processor.shutdown();
6364
});
6465

6566
it('should create a BatchSpanProcessor instance with config', () => {
6667
const processor = new BatchSpanProcessor(exporter, defaultBufferConfig);
6768
assert.ok(processor instanceof BatchSpanProcessor);
69+
processor.shutdown();
6870
});
6971

7072
it('should create a BatchSpanProcessor instance with empty config', () => {
7173
const processor = new BatchSpanProcessor(exporter, {});
7274
assert.ok(processor instanceof BatchSpanProcessor);
75+
processor.shutdown();
7376
});
7477
});
7578

@@ -100,6 +103,7 @@ describe('BatchSpanProcessor', () => {
100103
processor.onEnd(span);
101104
assert.strictEqual(exporter.getFinishedSpans().length, 0);
102105
}
106+
processor.shutdown();
103107
});
104108

105109
it('should force flush when timeout exceeded', done => {

0 commit comments

Comments
 (0)