Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ export async function startTestGenerationProcess(
)
// TODO: Send status to test summary
if (jobStatus === TestGenerationJobStatus.FAILED) {
session.numberOfTestsGenerated = 0
logger.verbose(`Test generation failed.`)
throw new TestGenFailedError()
}
Expand Down
3 changes: 3 additions & 0 deletions packages/core/src/codewhisperer/service/testGenHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,8 @@ export async function exportResultsArchive(
await fs.mkdir(pathToArchiveDir)

let downloadErrorMessage = undefined

const session = ChatSessionManager.Instance.getSession()
try {
const pathToArchive = path.join(pathToArchiveDir, 'QTestGeneration.zip')
// Download and deserialize the zip
Expand All @@ -248,6 +250,7 @@ export async function exportResultsArchive(
})
}
} catch (e) {
session.numberOfTestsGenerated = 0
downloadErrorMessage = (e as Error).message
getLogger().error(`Unit Test Generation: ExportResultArchive error = ${downloadErrorMessage}`)
throw new Error('Error downloading test generation result artifacts: ' + downloadErrorMessage)
Expand Down
Loading