From 09d3f6887a46c703eaf67bf8bab8d56e2b107bc1 Mon Sep 17 00:00:00 2001 From: Daniel Dyla Date: Tue, 7 Dec 2021 14:05:50 -0500 Subject: [PATCH] Update nock (#2652) Co-authored-by: Cole Easton --- .../packages/opentelemetry-instrumentation-http/package.json | 2 +- .../test/functionals/http-enable.test.ts | 4 ++-- .../test/functionals/https-enable.test.ts | 4 ++-- experimental/packages/opentelemetry-sdk-node/package.json | 2 +- packages/opentelemetry-exporter-jaeger/package.json | 2 +- packages/opentelemetry-exporter-zipkin/package.json | 2 +- packages/opentelemetry-resources/package.json | 2 +- packages/opentelemetry-semantic-conventions/package.json | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/experimental/packages/opentelemetry-instrumentation-http/package.json b/experimental/packages/opentelemetry-instrumentation-http/package.json index 419df11ab5..5ab6eac35b 100644 --- a/experimental/packages/opentelemetry-instrumentation-http/package.json +++ b/experimental/packages/opentelemetry-instrumentation-http/package.json @@ -58,7 +58,7 @@ "codecov": "3.8.3", "got": "9.6.0", "mocha": "7.2.0", - "nock": "12.0.3", + "nock": "13.0.11", "nyc": "15.1.0", "request": "2.88.2", "request-promise-native": "1.0.9", diff --git a/experimental/packages/opentelemetry-instrumentation-http/test/functionals/http-enable.test.ts b/experimental/packages/opentelemetry-instrumentation-http/test/functionals/http-enable.test.ts index 7658bfa65b..72c1ca5a1f 100644 --- a/experimental/packages/opentelemetry-instrumentation-http/test/functionals/http-enable.test.ts +++ b/experimental/packages/opentelemetry-instrumentation-http/test/functionals/http-enable.test.ts @@ -591,7 +591,7 @@ describe('HttpInstrumentation', () => { it('should have 1 ended span when request is aborted', async () => { nock(`${protocol}://my.server.com`) .get('/') - .socketDelay(50) + .delayConnection(50) .reply(200, ''); const promiseRequest = new Promise((resolve, reject) => { @@ -640,7 +640,7 @@ describe('HttpInstrumentation', () => { (resp: http.IncomingMessage) => { let data = ''; resp.on('data', chunk => { - req.abort(); + req.destroy(Error()); data += chunk; }); resp.on('end', () => { diff --git a/experimental/packages/opentelemetry-instrumentation-http/test/functionals/https-enable.test.ts b/experimental/packages/opentelemetry-instrumentation-http/test/functionals/https-enable.test.ts index 3811dbf803..46bf516e13 100644 --- a/experimental/packages/opentelemetry-instrumentation-http/test/functionals/https-enable.test.ts +++ b/experimental/packages/opentelemetry-instrumentation-http/test/functionals/https-enable.test.ts @@ -576,7 +576,7 @@ describe('HttpsInstrumentation', () => { it('should have 1 ended span when request is aborted', async () => { nock(`${protocol}://my.server.com`) .get('/') - .socketDelay(50) + .delayConnection(50) .reply(200, ''); const promiseRequest = new Promise((resolve, reject) => { @@ -625,7 +625,7 @@ describe('HttpsInstrumentation', () => { (resp: http.IncomingMessage) => { let data = ''; resp.on('data', chunk => { - req.abort(); + req.destroy(Error()); data += chunk; }); resp.on('end', () => { diff --git a/experimental/packages/opentelemetry-sdk-node/package.json b/experimental/packages/opentelemetry-sdk-node/package.json index 18abbf186e..1f9de6fb71 100644 --- a/experimental/packages/opentelemetry-sdk-node/package.json +++ b/experimental/packages/opentelemetry-sdk-node/package.json @@ -66,7 +66,7 @@ "gcp-metadata": "^4.1.4", "istanbul-instrumenter-loader": "3.0.1", "mocha": "7.2.0", - "nock": "12.0.3", + "nock": "13.0.11", "nyc": "15.1.0", "semver": "7.3.5", "sinon": "12.0.1", diff --git a/packages/opentelemetry-exporter-jaeger/package.json b/packages/opentelemetry-exporter-jaeger/package.json index d2f5631db2..1ce8fb80fb 100644 --- a/packages/opentelemetry-exporter-jaeger/package.json +++ b/packages/opentelemetry-exporter-jaeger/package.json @@ -49,7 +49,7 @@ "@types/sinon": "10.0.6", "codecov": "3.8.3", "mocha": "7.2.0", - "nock": "12.0.3", + "nock": "13.0.11", "nyc": "15.1.0", "rimraf": "3.0.2", "sinon": "12.0.1", diff --git a/packages/opentelemetry-exporter-zipkin/package.json b/packages/opentelemetry-exporter-zipkin/package.json index 7564974b9a..7b84136e46 100644 --- a/packages/opentelemetry-exporter-zipkin/package.json +++ b/packages/opentelemetry-exporter-zipkin/package.json @@ -69,7 +69,7 @@ "karma-spec-reporter": "0.0.32", "karma-webpack": "4.0.2", "mocha": "7.2.0", - "nock": "12.0.3", + "nock": "13.0.11", "nyc": "15.1.0", "rimraf": "3.0.2", "sinon": "12.0.1", diff --git a/packages/opentelemetry-resources/package.json b/packages/opentelemetry-resources/package.json index 646b70d281..a7fb9b38e5 100644 --- a/packages/opentelemetry-resources/package.json +++ b/packages/opentelemetry-resources/package.json @@ -56,7 +56,7 @@ "@types/sinon": "10.0.6", "codecov": "3.8.3", "mocha": "7.2.0", - "nock": "12.0.3", + "nock": "13.0.11", "nyc": "15.1.0", "rimraf": "3.0.2", "sinon": "12.0.1", diff --git a/packages/opentelemetry-semantic-conventions/package.json b/packages/opentelemetry-semantic-conventions/package.json index a529ac3aa7..bcf19d6817 100644 --- a/packages/opentelemetry-semantic-conventions/package.json +++ b/packages/opentelemetry-semantic-conventions/package.json @@ -50,7 +50,7 @@ "@types/sinon": "10.0.6", "codecov": "3.8.3", "mocha": "7.2.0", - "nock": "12.0.3", + "nock": "13.0.11", "nyc": "15.1.0", "rimraf": "3.0.2", "sinon": "12.0.1",