We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 60dd7d1 commit 8920ddfCopy full SHA for 8920ddf
plugins/node/opentelemetry-instrumentation-mongodb/test/mongodb.test.ts
@@ -62,6 +62,7 @@ describe('MongoDBInstrumentation', () => {
62
instrumentation.setTracerProvider(provider);
63
provider.addSpanProcessor(spanProcessor);
64
context.setGlobalContextManager(contextManager);
65
+ shouldTest = true;
66
accessCollection(URL, DB_NAME, COLLECTION_NAME)
67
.then(result => {
68
client = result.client;
@@ -97,8 +98,11 @@ describe('MongoDBInstrumentation', () => {
97
98
});
99
100
afterEach(done => {
- collection.deleteMany({}, done);
101
memoryExporter.reset();
102
+ if (shouldTest) {
103
+ return collection.deleteMany({}, done);
104
+ }
105
+ done();
106
107
108
after(() => {
0 commit comments