From ffb2ceddcc52cd091a961dc8e7216f349f3997d6 Mon Sep 17 00:00:00 2001 From: Roch Devost Date: Fri, 21 Jun 2024 15:19:31 -0400 Subject: [PATCH] increase timeout for aws-sdk and next tests (#4421) * increase timeout for aws-sdk and next tests * increase timeout for profiling integration tests * increase timeout for appsec tests * increase timeout for next test setup --- package.json | 2 +- .../test/integration-test/client.spec.js | 2 +- packages/datadog-plugin-next/test/index.spec.js | 2 +- packages/dd-trace/test/appsec/index.spec.js | 8 ++++++-- packages/dd-trace/test/setup/mocha.js | 3 ++- 5 files changed, 11 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 6c05c15ff39..ef694907f99 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "test:integration:cypress": "mocha --colors --timeout 30000 -r \"packages/dd-trace/test/setup/core.js\" \"integration-tests/cypress/*.spec.js\"", "test:integration:playwright": "mocha --colors --timeout 30000 -r \"packages/dd-trace/test/setup/core.js\" \"integration-tests/playwright/*.spec.js\"", "test:integration:selenium": "mocha --colors --timeout 30000 -r \"packages/dd-trace/test/setup/core.js\" \"integration-tests/selenium/*.spec.js\"", - "test:integration:profiler": "mocha --colors --timeout 90000 -r \"packages/dd-trace/test/setup/core.js\" \"integration-tests/profiler/*.spec.js\"", + "test:integration:profiler": "mocha --colors --timeout 180000 -r \"packages/dd-trace/test/setup/core.js\" \"integration-tests/profiler/*.spec.js\"", "test:integration:serverless": "mocha --colors --timeout 30000 -r \"packages/dd-trace/test/setup/core.js\" \"integration-tests/serverless/*.spec.js\"", "test:integration:plugins": "mocha --colors --exit -r \"packages/dd-trace/test/setup/mocha.js\" \"packages/datadog-plugin-@($(echo $PLUGINS))/test/integration-test/**/*.spec.js\"", "test:unit:plugins": "mocha --colors --exit -r \"packages/dd-trace/test/setup/mocha.js\" \"packages/datadog-instrumentations/test/@($(echo $PLUGINS)).spec.js\" \"packages/datadog-plugin-@($(echo $PLUGINS))/test/**/*.spec.js\" --exclude \"packages/datadog-plugin-@($(echo $PLUGINS))/test/integration-test/**/*.spec.js\"", diff --git a/packages/datadog-plugin-aws-sdk/test/integration-test/client.spec.js b/packages/datadog-plugin-aws-sdk/test/integration-test/client.spec.js index 0fdc15ea537..e077c0b64b2 100644 --- a/packages/datadog-plugin-aws-sdk/test/integration-test/client.spec.js +++ b/packages/datadog-plugin-aws-sdk/test/integration-test/client.spec.js @@ -15,7 +15,7 @@ describe('esm', () => { withVersions('aws-sdk', ['aws-sdk'], version => { before(async function () { - this.timeout(20000) + this.timeout(60000) sandbox = await createSandbox([`'aws-sdk@${version}'`], false, [ './packages/datadog-plugin-aws-sdk/test/integration-test/*']) }) diff --git a/packages/datadog-plugin-next/test/index.spec.js b/packages/datadog-plugin-next/test/index.spec.js index 4772c07a481..ed7e22fc3be 100644 --- a/packages/datadog-plugin-next/test/index.spec.js +++ b/packages/datadog-plugin-next/test/index.spec.js @@ -37,7 +37,7 @@ describe('Plugin', function () { }) before(function (done) { - this.timeout(40000) + this.timeout(120000) const cwd = standalone ? path.join(__dirname, '.next/standalone') : __dirname diff --git a/packages/dd-trace/test/appsec/index.spec.js b/packages/dd-trace/test/appsec/index.spec.js index 433e2ac2c5e..2a33c9348bc 100644 --- a/packages/dd-trace/test/appsec/index.spec.js +++ b/packages/dd-trace/test/appsec/index.spec.js @@ -33,7 +33,9 @@ const resultActions = { } } -describe('AppSec Index', () => { +describe('AppSec Index', function () { + this.timeout(5000) + let config let AppSec let web @@ -978,7 +980,9 @@ describe('AppSec Index', () => { }) }) -describe('IP blocking', () => { +describe('IP blocking', function () { + this.timeout(5000) + const invalidIp = '1.2.3.4' const validIp = '4.3.2.1' const ruleData = { diff --git a/packages/dd-trace/test/setup/mocha.js b/packages/dd-trace/test/setup/mocha.js index 15131c2946d..10baffd257c 100644 --- a/packages/dd-trace/test/setup/mocha.js +++ b/packages/dd-trace/test/setup/mocha.js @@ -85,7 +85,8 @@ function withNamingSchema ( const { opName, serviceName } = expected[versionName] - it('should conform to the naming schema', () => { + it('should conform to the naming schema', function () { + this.timeout(10000) return new Promise((resolve, reject) => { agent .use(traces => {