Skip to content

Commit 25445e1

Browse files
authored
chore: stub timeout (#1316)
1 parent 6f56600 commit 25445e1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

server/aws-lsp-codewhisperer/src/language-server/agenticChat/agenticChatController.test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ import { ChatDatabase } from './tools/chatDb/chatDb'
4747
import { LocalProjectContextController } from '../../shared/localProjectContextController'
4848
import { CancellationError } from '@aws/lsp-core'
4949
import { ToolApprovalException } from './tools/toolShared'
50+
import * as constants from './constants'
5051
import { generateAssistantResponseInputLimit, genericErrorMsg } from './constants'
5152
import { MISSING_BEARER_TOKEN_ERROR } from '../../shared/constants'
5253
import {
@@ -133,6 +134,9 @@ describe('AgenticChatController', () => {
133134
const setCredentials = setCredentialsForAmazonQTokenServiceManagerFactory(() => testFeatures)
134135

135136
beforeEach(() => {
137+
// Override the response timeout for tests to avoid long waits
138+
sinon.stub(constants, 'responseTimeoutMs').value(100)
139+
136140
sinon.stub(chokidar, 'watch').returns({
137141
on: sinon.stub(),
138142
close: sinon.stub(),

0 commit comments

Comments
 (0)