Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions tests/functional/aws-node-sdk/test/support/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@ const DEFAULT_GLOBAL_OPTIONS = {
// timeout.
const REQUEST_TIMEOUT = 30000;

// Idle timeout for pooled keep-alive sockets, kept below the server's 5s
// keep-alive so the client retires a socket before the server closes it.
// A value is required: Node clamps this against the server's advertised
// `Keep-Alive` hint, but only ever downwards from a non-zero timeout
// (`agentTimeout = this.options.timeout || 0`), so leaving it unset means
// pooled sockets never expire. See CLDSRV-968.
const AGENT_IDLE_TIMEOUT = 4000;

const DEFAULT_MEM_OPTIONS = {
endpoint: `${transport}://127.0.0.1:8000`,
port: 8000,
Expand All @@ -43,6 +51,7 @@ const DEFAULT_MEM_OPTIONS = {
maxSockets: 200,
keepAlive: true,
keepAliveMsecs: 1000,
timeout: AGENT_IDLE_TIMEOUT,
Comment thread
tcarmet marked this conversation as resolved.
}),
}),
};
Expand All @@ -57,6 +66,7 @@ const DEFAULT_AWS_OPTIONS = {
maxSockets: 200,
keepAlive: true,
keepAliveMsecs: 1000,
timeout: AGENT_IDLE_TIMEOUT,
}),
}),
};
Expand Down
Loading