File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed
packages/core/src/codewhisperer Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff 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 }
Original file line number Diff line number Diff 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 )
You can’t perform that action at this time.
0 commit comments