From f908622fd8d727759acefc0639a36566cbd83925 Mon Sep 17 00:00:00 2001 From: Thomas Carmet <8408330+tcarmet@users.noreply.github.com> Date: Wed, 10 Jun 2026 17:18:14 -0700 Subject: [PATCH] CLDSRV-918: raise SDK request timeout in functional test client The SDK v2 test config set no timeout, so all tests ran with the v2 default of 120s (aws-sdk lib/config.js httpOptions.timeout). The v3 migration introduced a 5s requestTimeout, which heavy server-side operations (multi-megabyte UploadPartCopy, 1000-key batch deletes) exceed under CI load since the server sends no response bytes until they complete. Raise it to 30s: enough headroom for heavy operations, while staying below mocha's 40s global timeout so a genuine hang still surfaces as the SDK TimeoutError. --- .../aws-node-sdk/test/support/config.js | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/tests/functional/aws-node-sdk/test/support/config.js b/tests/functional/aws-node-sdk/test/support/config.js index d18294a71f..92cb5dc868 100644 --- a/tests/functional/aws-node-sdk/test/support/config.js +++ b/tests/functional/aws-node-sdk/test/support/config.js @@ -22,15 +22,23 @@ const DEFAULT_GLOBAL_OPTIONS = { httpOptions, }; +// The SDK v2 config set no timeout, so tests ran with the v2 default of +// 120s; the v3 migration introduced a 5s timeout that heavy server-side +// operations (multi-megabyte UploadPartCopy, 1000-key batch deletes) exceed +// under CI load, as the server sends no response bytes until they complete. +// 30s stays below mocha's 40s global timeout so a genuine hang still +// surfaces as the SDK TimeoutError rather than a generic mocha timeout. +const REQUEST_TIMEOUT = 30000; + const DEFAULT_MEM_OPTIONS = { endpoint: `${transport}://127.0.0.1:8000`, port: 8000, forcePathStyle: true, - region: 'us-east-1', + region: 'us-east-1', maxAttempts: 3, requestHandler: new NodeHttpHandler({ connectionTimeout: 5000, - requestTimeout: 5000, + requestTimeout: REQUEST_TIMEOUT, httpAgent: new (ssl ? https : http).Agent({ maxSockets: 200, keepAlive: true, @@ -44,7 +52,7 @@ const DEFAULT_AWS_OPTIONS = { maxAttempts: 3, requestHandler: new NodeHttpHandler({ connectionTimeout: 5000, - socketTimeout: 5000, + requestTimeout: REQUEST_TIMEOUT, httpAgent: new https.Agent({ maxSockets: 200, keepAlive: true, @@ -64,9 +72,7 @@ function _getMemCredentials(profile) { function _getMemConfig(profile, config) { const credentials = _getMemCredentials(profile); - const memConfig = Object.assign({} - , DEFAULT_GLOBAL_OPTIONS, DEFAULT_MEM_OPTIONS - , { credentials }, config); + const memConfig = Object.assign({}, DEFAULT_GLOBAL_OPTIONS, DEFAULT_MEM_OPTIONS, { credentials }, config); if (process.env.IP) { memConfig.endpoint = `${transport}://${process.env.IP}:8000`; @@ -78,9 +84,7 @@ function _getMemConfig(profile, config) { function _getAwsConfig(profile, config) { const credentials = getAwsCredentials(profile); - const awsConfig = Object.assign({} - , DEFAULT_GLOBAL_OPTIONS, DEFAULT_AWS_OPTIONS - , { credentials }, config); + const awsConfig = Object.assign({}, DEFAULT_GLOBAL_OPTIONS, DEFAULT_AWS_OPTIONS, { credentials }, config); return awsConfig; }