fix: disable code index throttling during E2E tests to prevent timeouts

This commit is contained in:
hannesrudolph 2025-07-02 15:58:17 -06:00
parent 88b55ada3d
commit 8a21b2a1e7
2 changed files with 4 additions and 1 deletions

View file

@ -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

View file

@ -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 ---