Avoid timeouts in client integration test fixtures#74
Merged
data-douser merged 1 commit intomainfrom Feb 23, 2026
Merged
Conversation
Replace brittle longRunningTools whitelists with a prefix-based check
(toolName.startsWith("codeql_")) so that every codeql_* tool gets a
5-minute timeout with progress-based resets. This fixes intermittent
-32001 RequestTimeout failures in CI (e.g. codeql_pack_install) caused
by cold JVM starts, network pack downloads, and Windows runner overhead.
- ql-mcp-client.js: callTool() now checks prefix instead of whitelist
- integration-test-runner.js: add callTool() helper with timeout logic;
migrate all direct this.client.callTool() calls to use it
- monitoring-integration-test-runner.js: add timeout options to callTool()
- mcp-test-suite.js: add explicit timeout to connectivity test
Contributor
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors MCP tool invocation in the client integration testing harness to apply consistent request timeouts, aiming to reduce CI flakiness from intermittent MCP request timeouts—especially for CodeQL-related tools.
Changes:
- Updated
CodeQLMCPClient.callToolto treat allcodeql_*tools as long-running (5-minute timeout +resetTimeoutOnProgress), with 1-minute defaults for others. - Added
callToolhelpers to bothIntegrationTestRunnerandMonitoringIntegrationTestRunnerand migrated internal tool calls to use them. - Updated
MCPTestSuite’s tool call to explicitly use the 5-minute timeout + progress reset.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| client/src/ql-mcp-client.js | Standardizes timeouts based on codeql_* prefix and enables progress-based timeout reset for CodeQL tools. |
| client/src/lib/integration-test-runner.js | Introduces a centralized callTool helper and replaces scattered timeout logic with consistent defaults. |
| client/src/lib/monitoring-integration-test-runner.js | Adds a callTool helper mirroring the standardized timeout behavior. |
| client/src/lib/mcp-test-suite.js | Aligns basic tool invocation with the new 5-minute CodeQL timeout standard. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request refactors how timeouts are handled when calling MCP tools, especially CodeQL tools, across the integration test runner, monitoring integration test runner, and MCP client. The main improvement is the consistent application of a generous 5-minute timeout for all CodeQL-related tool invocations to prevent intermittent request timeouts in CI environments. The refactor also centralizes and simplifies the tool invocation logic, reducing duplication and improving maintainability.
Timeout and Tool Invocation Refactoring
callToolhelper method in bothIntegrationTestRunnerandMonitoringIntegrationTestRunnerthat automatically applies a 5-minute timeout for all CodeQL tools (those with names starting withcodeql_), and a 1-minute timeout for others. This replaces scattered, tool-specific timeout logic throughout the codebase. [1] [2]IntegrationTestRunnerto use the newcallToolmethod, removing duplicated timeout logic and simplifying tool invocation throughout the class. [1] [2] [3] [4] [5] [6] [7]MCP Client Improvements
callToolmethod inCodeQLMCPClientto use the same logic: any tool with a name starting withcodeql_gets a 5-minute timeout and hasresetTimeoutOnProgressenabled, ensuring consistent behavior across the codebase.Test Suite Consistency
MCPTestSuiteto explicitly use a 5-minute timeout and progress reset for its tool invocation, bringing it in line with the new standard.Overall, these changes make the codebase more robust against CI flakiness due to timeouts and easier to maintain by consolidating timeout logic in one place.