Skip to content

Commit e7b1c6d

Browse files
Merge master into feature/amazonqLSP
2 parents f4f022f + 31200df commit e7b1c6d

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

packages/core/src/codewhisperer/commands/startTestGeneration.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ export async function startTestGenerationProcess(
120120
)
121121
// TODO: Send status to test summary
122122
if (jobStatus === TestGenerationJobStatus.FAILED) {
123+
session.numberOfTestsGenerated = 0
123124
logger.verbose(`Test generation failed.`)
124125
throw new TestGenFailedError()
125126
}

packages/core/src/codewhisperer/service/testGenHandler.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,8 @@ export async function exportResultsArchive(
222222
await fs.mkdir(pathToArchiveDir)
223223

224224
let downloadErrorMessage = undefined
225+
226+
const session = ChatSessionManager.Instance.getSession()
225227
try {
226228
const pathToArchive = path.join(pathToArchiveDir, 'QTestGeneration.zip')
227229
// Download and deserialize the zip
@@ -248,6 +250,7 @@ export async function exportResultsArchive(
248250
})
249251
}
250252
} catch (e) {
253+
session.numberOfTestsGenerated = 0
251254
downloadErrorMessage = (e as Error).message
252255
getLogger().error(`Unit Test Generation: ExportResultArchive error = ${downloadErrorMessage}`)
253256
throw new Error('Error downloading test generation result artifacts: ' + downloadErrorMessage)

0 commit comments

Comments
 (0)