Skip to content

Commit a19b025

Browse files
committed
change test to accomodate for time out changes
1 parent 6e5fa4a commit a19b025

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/amazonq/test/unit/codewhisperer/service/securityScanHandler.test.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import {
1515
ListCodeScanFindingsResponse,
1616
pollScanJobStatus,
1717
SecurityScanTimedOutError,
18+
CodeWhispererConstants,
1819
} from 'aws-core-vscode/codewhisperer'
1920
import { timeoutUtils } from 'aws-core-vscode/shared'
2021
import assert from 'assert'
@@ -303,7 +304,7 @@ describe('securityScanHandler', function () {
303304

304305
const pollPromise = pollScanJobStatus(mockClient, mockJobId, CodeAnalysisScope.FILE_AUTO, mockStartTime)
305306

306-
const expectedTimeoutMs = 60_000
307+
const expectedTimeoutMs = CodeWhispererConstants.expressScanTimeoutMs
307308
clock.tick(expectedTimeoutMs + 1000)
308309

309310
await assert.rejects(() => pollPromise, SecurityScanTimedOutError)
@@ -314,7 +315,7 @@ describe('securityScanHandler', function () {
314315

315316
const pollPromise = pollScanJobStatus(mockClient, mockJobId, CodeAnalysisScope.PROJECT, mockStartTime)
316317

317-
const expectedTimeoutMs = 600_000
318+
const expectedTimeoutMs = CodeWhispererConstants.standardScanTimeoutMs
318319
clock.tick(expectedTimeoutMs + 1000)
319320

320321
await assert.rejects(() => pollPromise, SecurityScanTimedOutError)

0 commit comments

Comments
 (0)