diff --git a/apps/vscode-e2e/src/runTest.ts b/apps/vscode-e2e/src/runTest.ts index 2e8b262a49..a1005eb0e7 100644 --- a/apps/vscode-e2e/src/runTest.ts +++ b/apps/vscode-e2e/src/runTest.ts @@ -30,6 +30,7 @@ async function main() { ...process.env, ...(testGrep && { TEST_GREP: testGrep }), ...(testFile && { TEST_FILE: testFile }), + VSCODE_E2E_TESTING: "true", // Flag to indicate E2E testing environment } // Download VS Code, unzip it and run the integration test diff --git a/src/services/code-index/manager.ts b/src/services/code-index/manager.ts index 9499fc0545..13bca68357 100644 --- a/src/services/code-index/manager.ts +++ b/src/services/code-index/manager.ts @@ -54,7 +54,9 @@ export class CodeIndexManager { this.context = context // Create state manager with default throttle interval (500ms) // Can be customized by passing a different value to the constructor - this._stateManager = new CodeIndexStateManager() + // In test environments, disable throttling to prevent timeouts + const throttleInterval = process.env.VSCODE_E2E_TESTING === "true" ? 0 : undefined + this._stateManager = new CodeIndexStateManager(throttleInterval) } // --- Public API ---