diff --git a/LICENSE-3rdparty.csv b/LICENSE-3rdparty.csv index 043116f948..45f88f66cb 100644 --- a/LICENSE-3rdparty.csv +++ b/LICENSE-3rdparty.csv @@ -49,7 +49,6 @@ dev,eslint-plugin-mocha,MIT,Copyright 2014 Mathias Schreck dev,eslint-plugin-n,MIT,Copyright 2015 Toru Nagashima dev,eslint-plugin-promise,ISC,jden and other contributors dev,express,MIT,Copyright 2009-2014 TJ Holowaychuk 2013-2014 Roman Shtylman 2014-2015 Douglas Christopher Wilson -dev,find-process,MIT,Copyright (c) 2016 Zoujie dev,get-port,MIT,Copyright Sindre Sorhus dev,glob,ISC,Copyright Isaac Z. Schlueter and Contributors dev,graphql,MIT,Copyright 2015 Facebook Inc. diff --git a/package.json b/package.json index 2e8d918736..49958f4861 100644 --- a/package.json +++ b/package.json @@ -128,7 +128,6 @@ "eslint-plugin-n": "^16.6.2", "eslint-plugin-promise": "^6.4.0", "express": "^4.18.2", - "find-process": "^1.4.7", "get-port": "^3.2.0", "glob": "^7.1.6", "graphql": "0.13.2", diff --git a/packages/datadog-plugin-azure-functions/test/integration-test/client.spec.js b/packages/datadog-plugin-azure-functions/test/integration-test/client.spec.js index fbe5951abc..dd43d3a760 100644 --- a/packages/datadog-plugin-azure-functions/test/integration-test/client.spec.js +++ b/packages/datadog-plugin-azure-functions/test/integration-test/client.spec.js @@ -8,11 +8,9 @@ const { } = require('../../../../integration-tests/helpers') const { spawn } = require('child_process') const { assert } = require('chai') -const findProcess = require('find-process') describe('esm', () => { let agent - let proc let sandbox withVersions('azure-functions', '@azure/functions', version => { @@ -32,19 +30,15 @@ describe('esm', () => { }) afterEach(async () => { - const azureFuncProc = await findProcess('name', 'func', true) - const azureFuncProcPid = azureFuncProc[0]?.pid ?? null - azureFuncProcPid !== null && process.kill(azureFuncProcPid, 'SIGKILL') - - proc && proc.kill() await agent.stop() + process.kill(0, 'SIGINT') }) it('is instrumented', async () => { const envArgs = { PATH: `${sandbox.folder}/node_modules/.bin:${process.env.PATH}` } - proc = await spawnPluginIntegrationTestProc(sandbox.folder, 'func', ['start'], agent.port, undefined, envArgs) + await spawnPluginIntegrationTestProc(sandbox.folder, 'func', ['start'], agent.port, undefined, envArgs) return curlAndAssertMessage(agent, 'http://127.0.0.1:7071/api/httptest', ({ headers, payload }) => { assert.propertyVal(headers, 'host', `127.0.0.1:${agent.port}`) @@ -90,7 +84,7 @@ function spawnProc (command, args, options = {}, stdioHandler, stderrHandler) { if (!options.silent) console.log(data.toString()) if (data.toString().includes('http://localhost:7071/api/httptest')) { - resolve() + resolve(proc) } }) diff --git a/yarn.lock b/yarn.lock index e8dc620ab5..ca8b325ec9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1370,11 +1370,6 @@ combined-stream@^1.0.6, combined-stream@^1.0.8: dependencies: delayed-stream "~1.0.0" -commander@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-5.1.0.tgz#46abbd1652f8e059bddaef99bbdcb2ad9cf179ae" - integrity sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg== - commander@^9.1.0: version "9.5.0" resolved "https://registry.npmjs.org/commander/-/commander-9.5.0.tgz" @@ -2141,15 +2136,6 @@ find-cache-dir@^3.2.0: make-dir "^3.0.2" pkg-dir "^4.1.0" -find-process@^1.4.7: - version "1.4.7" - resolved "https://registry.yarnpkg.com/find-process/-/find-process-1.4.7.tgz#8c76962259216c381ef1099371465b5b439ea121" - integrity sha512-/U4CYp1214Xrp3u3Fqr9yNynUrr5Le4y0SsJh2lMDDSbpwYSz3M2SMWQC+wqcx79cN8PQtHQIL8KnuY9M66fdg== - dependencies: - chalk "^4.0.0" - commander "^5.1.0" - debug "^4.1.1" - find-up@5.0.0, find-up@^5.0.0: version "5.0.0" resolved "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz"