From 48327d7d83390a062c6443d0ed1f880a75cd9e69 Mon Sep 17 00:00:00 2001 From: Daniel Dyla Date: Fri, 29 May 2020 08:29:13 -0400 Subject: [PATCH] chore: disable context after all tests --- plugins/node/opentelemetry-plugin-express/test/express.test.ts | 2 +- plugins/node/opentelemetry-plugin-ioredis/test/ioredis.test.ts | 2 +- plugins/node/opentelemetry-plugin-mongodb/test/mongodb.test.ts | 2 +- .../opentelemetry-plugin-mongodb/test/multiple_versions.test.ts | 2 +- plugins/node/opentelemetry-plugin-mysql/test/mysql.test.ts | 2 +- plugins/node/opentelemetry-plugin-pg-pool/test/pg-pool.test.ts | 2 +- plugins/node/opentelemetry-plugin-redis/test/redis.test.ts | 2 +- .../test/documentLoad.test.ts | 2 +- .../test/userInteraction.nozone.test.ts | 2 +- .../test/userInteraction.test.ts | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/plugins/node/opentelemetry-plugin-express/test/express.test.ts b/plugins/node/opentelemetry-plugin-express/test/express.test.ts index 65dbfe14b9..e107170ee6 100644 --- a/plugins/node/opentelemetry-plugin-express/test/express.test.ts +++ b/plugins/node/opentelemetry-plugin-express/test/express.test.ts @@ -72,7 +72,7 @@ describe('Express Plugin', () => { afterEach(() => { memoryExporter.reset(); - contextManager.disable(); + context.disable(); }); describe('Instrumenting normal get operations', () => { diff --git a/plugins/node/opentelemetry-plugin-ioredis/test/ioredis.test.ts b/plugins/node/opentelemetry-plugin-ioredis/test/ioredis.test.ts index b31318816b..ca7309b6a5 100644 --- a/plugins/node/opentelemetry-plugin-ioredis/test/ioredis.test.ts +++ b/plugins/node/opentelemetry-plugin-ioredis/test/ioredis.test.ts @@ -63,7 +63,7 @@ describe('ioredis', () => { }); afterEach(() => { - contextManager.disable(); + context.disable(); }); before(function() { diff --git a/plugins/node/opentelemetry-plugin-mongodb/test/mongodb.test.ts b/plugins/node/opentelemetry-plugin-mongodb/test/mongodb.test.ts index 3b0a37cd87..d2bd52f79e 100644 --- a/plugins/node/opentelemetry-plugin-mongodb/test/mongodb.test.ts +++ b/plugins/node/opentelemetry-plugin-mongodb/test/mongodb.test.ts @@ -88,7 +88,7 @@ describe('MongoDBPlugin', () => { afterEach(done => { collection.deleteOne({}, done); - contextManager.disable(); + context.disable(); }); after(() => { diff --git a/plugins/node/opentelemetry-plugin-mongodb/test/multiple_versions.test.ts b/plugins/node/opentelemetry-plugin-mongodb/test/multiple_versions.test.ts index 819493aeb2..b04e6cae9e 100644 --- a/plugins/node/opentelemetry-plugin-mongodb/test/multiple_versions.test.ts +++ b/plugins/node/opentelemetry-plugin-mongodb/test/multiple_versions.test.ts @@ -85,7 +85,7 @@ describe('Multiple enable on the plugin', () => { afterEach(done => { collection.deleteOne({}, done); - contextManager.disable(); + context.disable(); }); after(() => { diff --git a/plugins/node/opentelemetry-plugin-mysql/test/mysql.test.ts b/plugins/node/opentelemetry-plugin-mysql/test/mysql.test.ts index 9e1c608cb4..aec297e35f 100644 --- a/plugins/node/opentelemetry-plugin-mysql/test/mysql.test.ts +++ b/plugins/node/opentelemetry-plugin-mysql/test/mysql.test.ts @@ -101,7 +101,7 @@ describe('mysql@2.x', () => { }); afterEach(done => { - contextManager.disable(); + context.disable(); memoryExporter.reset(); plugin.disable(); connection.end(() => { diff --git a/plugins/node/opentelemetry-plugin-pg-pool/test/pg-pool.test.ts b/plugins/node/opentelemetry-plugin-pg-pool/test/pg-pool.test.ts index 5118fea88c..aaa38c5c69 100644 --- a/plugins/node/opentelemetry-plugin-pg-pool/test/pg-pool.test.ts +++ b/plugins/node/opentelemetry-plugin-pg-pool/test/pg-pool.test.ts @@ -136,7 +136,7 @@ describe('pg-pool@2.x', () => { memoryExporter.reset(); plugin.disable(); pgPlugin.disable(); - contextManager.disable(); + context.disable(); }); it('should return a plugin', () => { diff --git a/plugins/node/opentelemetry-plugin-redis/test/redis.test.ts b/plugins/node/opentelemetry-plugin-redis/test/redis.test.ts index 6d03a14d85..d7332b9beb 100644 --- a/plugins/node/opentelemetry-plugin-redis/test/redis.test.ts +++ b/plugins/node/opentelemetry-plugin-redis/test/redis.test.ts @@ -62,7 +62,7 @@ describe('redis@2.x', () => { }); afterEach(() => { - contextManager.disable(); + context.disable(); }); before(function() { diff --git a/plugins/web/opentelemetry-plugin-document-load/test/documentLoad.test.ts b/plugins/web/opentelemetry-plugin-document-load/test/documentLoad.test.ts index ad6787cc0b..2015bdb40d 100644 --- a/plugins/web/opentelemetry-plugin-document-load/test/documentLoad.test.ts +++ b/plugins/web/opentelemetry-plugin-document-load/test/documentLoad.test.ts @@ -229,7 +229,7 @@ describe('DocumentLoad Plugin', () => { }); afterEach(() => { - contextManager.disable(); + context.disable(); Object.defineProperty(window.document, 'readyState', { writable: true, value: 'complete', diff --git a/plugins/web/opentelemetry-plugin-user-interaction/test/userInteraction.nozone.test.ts b/plugins/web/opentelemetry-plugin-user-interaction/test/userInteraction.nozone.test.ts index 0fc1b6456a..3ac0fd7a4f 100644 --- a/plugins/web/opentelemetry-plugin-user-interaction/test/userInteraction.nozone.test.ts +++ b/plugins/web/opentelemetry-plugin-user-interaction/test/userInteraction.nozone.test.ts @@ -89,7 +89,7 @@ describe('UserInteractionPlugin', () => { requests = []; sandbox.restore(); exportSpy.restore(); - contextManager.disable(); + context.disable(); }); it('should handle task without async operation', () => { diff --git a/plugins/web/opentelemetry-plugin-user-interaction/test/userInteraction.test.ts b/plugins/web/opentelemetry-plugin-user-interaction/test/userInteraction.test.ts index e4b773edad..c96321e9f0 100644 --- a/plugins/web/opentelemetry-plugin-user-interaction/test/userInteraction.test.ts +++ b/plugins/web/opentelemetry-plugin-user-interaction/test/userInteraction.test.ts @@ -87,7 +87,7 @@ describe('UserInteractionPlugin', () => { requests = []; sandbox.restore(); exportSpy.restore(); - contextManager.disable(); + context.disable(); }); it('should handle task without async operation', () => {