From 00c33b97876d6f6b0081db6ca6434d1f5c84f2d7 Mon Sep 17 00:00:00 2001 From: Ashish Reddy Podduturi Date: Tue, 4 Feb 2025 15:53:24 -0800 Subject: [PATCH 1/3] Adding payload manifest for payload limit errors for debugging. --- .../CodeWhispererCodeTestSession.kt | 4 +- .../CodeWhispererUTGChatManager.kt | 4 + .../codescan/CodeWhispererCodeScanSession.kt | 1 - .../sessionconfig/CodeScanSessionConfig.kt | 5 +- .../codetest/CodeTestException.kt | 2 +- .../sessionconfig/CodeTestSessionConfig.kt | 150 ++++++++++++------ .../CodeWhispererTelemetryService.kt | 2 - .../CodeWhispererTelemetryServiceNew.kt | 2 - 8 files changed, 110 insertions(+), 60 deletions(-) diff --git a/plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonqCodeTest/CodeWhispererCodeTestSession.kt b/plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonqCodeTest/CodeWhispererCodeTestSession.kt index 127106f9cd7..f13d7fb7f43 100644 --- a/plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonqCodeTest/CodeWhispererCodeTestSession.kt +++ b/plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonqCodeTest/CodeWhispererCodeTestSession.kt @@ -75,12 +75,12 @@ class CodeWhispererCodeTestSession(val sessionContext: CodeTestSessionContext) { LOG.debug { "Total size of source payload in KB: ${payloadContext.srcPayloadSize * 1.0 / TOTAL_BYTES_IN_KB} \n" + - "Total size of build payload in KB: ${(payloadContext.buildPayloadSize ?: 0) * 1.0 / TOTAL_BYTES_IN_KB} \n" + "Total size of source zip file in KB: ${payloadContext.srcZipFileSize * 1.0 / TOTAL_BYTES_IN_KB} \n" + "Total number of lines included: ${payloadContext.totalLines} \n" + "Total number of files included in payload: ${payloadContext.totalFiles} \n" + "Total time taken for creating payload: ${payloadContext.totalTimeInMilliseconds * 1.0 / TOTAL_MILLIS_IN_SECOND} seconds\n" + - "Payload context language: ${payloadContext.language}" + "Payload context language: ${payloadContext.language}" + + "Payload exceeded the limit: ${payloadContext.payloadLimitCrossed}" } // 2 & 3. CreateUploadURL and upload the context. diff --git a/plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonqCodeTest/CodeWhispererUTGChatManager.kt b/plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonqCodeTest/CodeWhispererUTGChatManager.kt index 04c1e4dc6db..a59e6c8d569 100644 --- a/plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonqCodeTest/CodeWhispererUTGChatManager.kt +++ b/plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonqCodeTest/CodeWhispererUTGChatManager.kt @@ -39,6 +39,7 @@ import software.aws.toolkits.jetbrains.services.amazonqCodeTest.session.Session import software.aws.toolkits.jetbrains.services.amazonqCodeTest.utils.combineBuildAndExecuteLogFiles import software.aws.toolkits.jetbrains.services.codemodernizer.utils.calculateTotalLatency import software.aws.toolkits.jetbrains.services.codewhisperer.codetest.CodeTestException +import software.aws.toolkits.jetbrains.services.codewhisperer.codetest.fileTooLarge import software.aws.toolkits.jetbrains.services.codewhisperer.codetest.sessionconfig.CodeTestSessionConfig import software.aws.toolkits.jetbrains.services.codewhisperer.codetest.testGenStoppedError import software.aws.toolkits.jetbrains.services.codewhisperer.credentials.CodeWhispererClientAdaptor @@ -94,6 +95,9 @@ class CodeWhispererUTGChatManager(val project: Project, private val cs: Coroutin ) val codeTestResponseContext = createUploadUrl(codeTestChatHelper, previousIterationContext) + if (codeTestResponseContext.payloadContext.payloadLimitCrossed == true) { + fileTooLarge() + } session.srcPayloadSize = codeTestResponseContext.payloadContext.srcPayloadSize session.srcZipFileSize = codeTestResponseContext.payloadContext.srcZipFileSize session.artifactUploadDuration = codeTestResponseContext.serviceInvocationContext.artifactsUploadDuration diff --git a/plugins/amazonq/codewhisperer/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codewhisperer/codescan/CodeWhispererCodeScanSession.kt b/plugins/amazonq/codewhisperer/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codewhisperer/codescan/CodeWhispererCodeScanSession.kt index d1cd4ac5ccf..448fd045ac0 100644 --- a/plugins/amazonq/codewhisperer/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codewhisperer/codescan/CodeWhispererCodeScanSession.kt +++ b/plugins/amazonq/codewhisperer/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codewhisperer/codescan/CodeWhispererCodeScanSession.kt @@ -91,7 +91,6 @@ class CodeWhispererCodeScanSession(val sessionContext: CodeScanSessionContext) { if (isProjectScope()) { LOG.debug { "Total size of source payload in KB: ${payloadContext.srcPayloadSize * 1.0 / TOTAL_BYTES_IN_KB} \n" + - "Total size of build payload in KB: ${(payloadContext.buildPayloadSize ?: 0) * 1.0 / TOTAL_BYTES_IN_KB} \n" + "Total size of source zip file in KB: ${payloadContext.srcZipFileSize * 1.0 / TOTAL_BYTES_IN_KB} \n" + "Total number of lines reviewed: ${payloadContext.totalLines} \n" + "Total number of files included in payload: ${payloadContext.totalFiles} \n" + diff --git a/plugins/amazonq/codewhisperer/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codewhisperer/codescan/sessionconfig/CodeScanSessionConfig.kt b/plugins/amazonq/codewhisperer/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codewhisperer/codescan/sessionconfig/CodeScanSessionConfig.kt index 1ec939ee767..8032cf18320 100644 --- a/plugins/amazonq/codewhisperer/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codewhisperer/codescan/sessionconfig/CodeScanSessionConfig.kt +++ b/plugins/amazonq/codewhisperer/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codewhisperer/codescan/sessionconfig/CodeScanSessionConfig.kt @@ -334,7 +334,8 @@ data class PayloadContext( val scannedFiles: List, val srcPayloadSize: Long, val srcZipFileSize: Long, - val buildPayloadSize: Long? = null, + val payloadManifest: Set>? = null, + val payloadLimitCrossed: Boolean? = false, ) data class PayloadMetadata( @@ -343,4 +344,6 @@ data class PayloadMetadata( val linesScanned: Long, val language: CodewhispererLanguage, val codeDiff: String? = null, + val payloadManifest: Set>? = null, + val payloadLimitCrossed: Boolean? = false, ) diff --git a/plugins/amazonq/codewhisperer/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codewhisperer/codetest/CodeTestException.kt b/plugins/amazonq/codewhisperer/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codewhisperer/codetest/CodeTestException.kt index 1c71796463f..bd1aac1c9eb 100644 --- a/plugins/amazonq/codewhisperer/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codewhisperer/codetest/CodeTestException.kt +++ b/plugins/amazonq/codewhisperer/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codewhisperer/codetest/CodeTestException.kt @@ -16,7 +16,7 @@ open class CodeTestException( internal fun noFileOpenError(): Nothing = throw CodeTestException(message("codewhisperer.codescan.no_file_open"), "ProjectZipError") -internal fun fileTooLarge(): Nothing = +fun fileTooLarge(): Nothing = throw CodeTestException(message("codewhisperer.codescan.file_too_large_telemetry"), "ProjectZipError") internal fun cannotFindFile(errorMessage: String, filepath: String): Nothing = diff --git a/plugins/amazonq/codewhisperer/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codewhisperer/codetest/sessionconfig/CodeTestSessionConfig.kt b/plugins/amazonq/codewhisperer/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codewhisperer/codetest/sessionconfig/CodeTestSessionConfig.kt index 6a101fbd4d0..b2cc33d67d7 100644 --- a/plugins/amazonq/codewhisperer/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codewhisperer/codetest/sessionconfig/CodeTestSessionConfig.kt +++ b/plugins/amazonq/codewhisperer/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codewhisperer/codetest/sessionconfig/CodeTestSessionConfig.kt @@ -101,7 +101,7 @@ class CodeTestSessionConfig( } // Copy all the included source files to the source zip - val srcZip = zipFiles(payloadMetadata.sourceFiles.map { Path.of(it) }) + val srcZip = zipFiles(payloadMetadata) val payloadContext = PayloadContext( payloadMetadata.language, payloadMetadata.linesScanned, @@ -109,7 +109,9 @@ class CodeTestSessionConfig( Instant.now().toEpochMilli() - start, payloadMetadata.sourceFiles.mapNotNull { Path.of(it).toFile().toVirtualFile() }, payloadMetadata.payloadSize, - srcZip.length() + srcZip.length(), + payloadMetadata.payloadManifest, + payloadMetadata.payloadLimitCrossed, ) return Payload(payloadContext, srcZip) @@ -129,16 +131,20 @@ class CodeTestSessionConfig( } } - private fun zipFiles(files: List): File = createTemporaryZipFile { - files.forEach { file -> - try { - val relativePath = file.relativeTo(projectRoot.toNioPath()) - val projectBaseName = projectRoot.name - val zipEntryPath = "$projectBaseName/${relativePath.toString().replace("\\", "/")}" - LOG.debug { "Adding file to ZIP: $zipEntryPath" } - it.putNextEntry(zipEntryPath, file) - } catch (e: Exception) { - cannotFindFile("Zipping error: ${e.message}", file.toString()) + private fun zipFiles(payloadMetadata: PayloadMetadata): File = createTemporaryZipFile { + if (payloadMetadata.payloadLimitCrossed == false) { + payloadMetadata.sourceFiles.forEach { file -> + Path.of(file).let { path -> + try { + val relativePath = path.relativeTo(projectRoot.toNioPath()) + val projectBaseName = projectRoot.name + val zipEntryPath = "$projectBaseName/${relativePath.toString().replace("\\", "/")}" + LOG.debug { "Adding file to ZIP: $zipEntryPath" } + it.putNextEntry(zipEntryPath, path) + } catch (e: Exception) { + cannotFindFile("Zipping error: ${e.message}", path.toString()) + } + } } } @@ -160,6 +166,18 @@ class CodeTestSessionConfig( if (buildAndExecuteLogFile != null) { it.putNextEntry(Path.of(utgDir, buildAndExecuteLogDir, "buildAndExecuteLog").name, buildAndExecuteLogFile.inputStream) } + if (payloadMetadata.payloadLimitCrossed == true) { + // write payloadMetadata.payloadManifest into a json file in repoMapData directory. manifest is Set> write into file first or ina byte stream + val payloadManifestPath = Path.of(utgDir, "repoMapData", "payloadManifest.json") + LOG.debug { "Adding payload manifest to ZIP: $payloadManifestPath" } + // Create ZIP entry with the relative path + val zipEntry = ZipEntry(payloadManifestPath.toString()) + it.putNextEntry(zipEntry) + // Write the content once using byte array + payloadMetadata.payloadManifest.toString().toByteArray().inputStream().use { inputStream -> + inputStream.copyTo(it) + } + } }.toFile() fun getProjectPayloadMetadata(): PayloadMetadata { @@ -170,11 +188,24 @@ class CodeTestSessionConfig( var currentTotalLines = 0L val languageCounts = mutableMapOf() + // Create a data structure to store file information + val fileInfoList = mutableSetOf>() + var exceededPayloadLimit = false + // Adding Target File to make sure target file doesn't get filtered out. selectedFile?.let { selected -> files.add(selected.path) currentTotalFileSize += selected.length currentTotalLines += countLinesInVirtualFile(selected) + + // Add selected file info to the list + fileInfoList.add( + Pair( + selected.path, + selected.length + ) + ) + selected.programmingLanguage().let { language -> if (language !is CodeWhispererUnknownLanguage) { languageCounts[language] = (languageCounts[language] ?: 0) + 1 @@ -182,49 +213,66 @@ class CodeTestSessionConfig( } } - moduleLoop@ for (module in project.modules) { - val changeListManager = ChangeListManager.getInstance(module.project) - module.guessModuleDir()?.let { moduleDir -> - val gitIgnoreFilteringUtil = GitIgnoreFilteringUtil(moduleDir) - stack.push(moduleDir) - while (stack.isNotEmpty()) { - val current = stack.pop() - - if (!current.isDirectory) { - if (current.isFile && current.path != selectedFile?.path && - !changeListManager.isIgnoredFile(current) && - runBlocking { !gitIgnoreFilteringUtil.ignoreFile(current) } && - runReadAction { !fileIndex.isInLibrarySource(current) } - ) { - if (willExceedPayloadLimit(currentTotalFileSize, current.length)) { - fileTooLarge() - } else { - try { - val language = current.programmingLanguage() - if (language !is CodeWhispererUnknownLanguage) { - languageCounts[language] = (languageCounts[language] ?: 0) + 1 + run { + for (module in project.modules) { + val changeListManager = ChangeListManager.getInstance(module.project) + module.guessModuleDir()?.let { moduleDir -> + val gitIgnoreFilteringUtil = GitIgnoreFilteringUtil(moduleDir) + stack.push(moduleDir) + while (stack.isNotEmpty()) { + val current = stack.pop() + + if (!current.isDirectory) { + if (current.isFile && current.path != selectedFile?.path && + !changeListManager.isIgnoredFile(current) && + runBlocking { !gitIgnoreFilteringUtil.ignoreFile(current) } && + runReadAction { !fileIndex.isInLibrarySource(current) } + ) { + if (willExceedPayloadLimit(currentTotalFileSize, current.length)) { + fileInfoList.add( + Pair( + current.path, + current.length + ) + ) + exceededPayloadLimit = true + return@run + } else { + try { + val language = current.programmingLanguage() + if (language !is CodeWhispererUnknownLanguage) { + languageCounts[language] = (languageCounts[language] ?: 0) + 1 + } + files.add(current.path) + currentTotalFileSize += current.length + currentTotalLines += countLinesInVirtualFile(current) + + // Add file info to the list + fileInfoList.add( + Pair( + current.path, + current.length + ) + ) + } catch (e: Exception) { + LOG.debug { "Error parsing the file: ${current.path} with error: ${e.message}" } + continue } - files.add(current.path) - currentTotalFileSize += current.length - currentTotalLines += countLinesInVirtualFile(current) - } catch (e: Exception) { - LOG.debug { "Error parsing the file: ${current.path} with error: ${e.message}" } - continue } } - } - } else { - // Directory case: only traverse if not ignored - if (!changeListManager.isIgnoredFile(current) && - runBlocking { !gitIgnoreFilteringUtil.ignoreFile(current) } && - !traversedDirectories.contains(current) && current.isValid && - runReadAction { !fileIndex.isInLibrarySource(current) } - ) { - for (child in current.children) { - stack.push(child) + } else { + // Directory case: only traverse if not ignored + if (!changeListManager.isIgnoredFile(current) && + runBlocking { !gitIgnoreFilteringUtil.ignoreFile(current) } && + !traversedDirectories.contains(current) && current.isValid && + runReadAction { !fileIndex.isInLibrarySource(current) } + ) { + for (child in current.children) { + stack.push(child) + } } + traversedDirectories.add(current) } - traversedDirectories.add(current) } } } @@ -238,7 +286,7 @@ class CodeTestSessionConfig( cannotFindValidFile("Amazon Q: doesn't contain valid files to generate tests") } programmingLanguage = maxCountLanguage - return PayloadMetadata(files, currentTotalFileSize, currentTotalLines, maxCountLanguage.toTelemetryType()) + return PayloadMetadata(files, currentTotalFileSize, currentTotalLines, maxCountLanguage.toTelemetryType(), null, fileInfoList, exceededPayloadLimit) } fun getRelativePath(): Path? = try { diff --git a/plugins/amazonq/codewhisperer/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codewhisperer/telemetry/CodeWhispererTelemetryService.kt b/plugins/amazonq/codewhisperer/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codewhisperer/telemetry/CodeWhispererTelemetryService.kt index e6ef506adb4..7a1033e1d8e 100644 --- a/plugins/amazonq/codewhisperer/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codewhisperer/telemetry/CodeWhispererTelemetryService.kt +++ b/plugins/amazonq/codewhisperer/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codewhisperer/telemetry/CodeWhispererTelemetryService.kt @@ -315,7 +315,6 @@ class CodeWhispererTelemetryService { "Number of security scan issues with fixes: $issuesWithFixes, \n" + "Language: ${payloadContext.language}, \n" + "Uncompressed source payload size in bytes: ${payloadContext.srcPayloadSize}, \n" + - "Uncompressed build payload size in bytes: ${payloadContext.buildPayloadSize}, \n" + "Compressed source zip file size in bytes: ${payloadContext.srcZipFileSize}, \n" + "Total project size in bytes: ${codeScanEvent.totalProjectSizeInBytes}, \n" + "Total duration of the security scan job in milliseconds: ${codeScanEvent.duration}, \n" + @@ -334,7 +333,6 @@ class CodeWhispererTelemetryService { codewhispererCodeScanJobId = codeScanJobId, codewhispererCodeScanProjectBytes = codeScanEvent.totalProjectSizeInBytes, codewhispererCodeScanSrcPayloadBytes = payloadContext.srcPayloadSize, - codewhispererCodeScanBuildPayloadBytes = payloadContext.buildPayloadSize, codewhispererCodeScanSrcZipFileBytes = payloadContext.srcZipFileSize, codewhispererCodeScanTotalIssues = totalIssues.toLong(), codewhispererCodeScanIssuesWithFixes = issuesWithFixes.toLong(), diff --git a/plugins/amazonq/codewhisperer/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codewhisperer/telemetry/CodeWhispererTelemetryServiceNew.kt b/plugins/amazonq/codewhisperer/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codewhisperer/telemetry/CodeWhispererTelemetryServiceNew.kt index 7ed73527d57..2125f79ad40 100644 --- a/plugins/amazonq/codewhisperer/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codewhisperer/telemetry/CodeWhispererTelemetryServiceNew.kt +++ b/plugins/amazonq/codewhisperer/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codewhisperer/telemetry/CodeWhispererTelemetryServiceNew.kt @@ -299,7 +299,6 @@ class CodeWhispererTelemetryServiceNew { "Number of security scan issues with fixes: $issuesWithFixes, \n" + "Language: ${payloadContext.language}, \n" + "Uncompressed source payload size in bytes: ${payloadContext.srcPayloadSize}, \n" + - "Uncompressed build payload size in bytes: ${payloadContext.buildPayloadSize}, \n" + "Compressed source zip file size in bytes: ${payloadContext.srcZipFileSize}, \n" + "Total project size in bytes: ${codeScanEvent.totalProjectSizeInBytes}, \n" + "Total duration of the security scan job in milliseconds: ${codeScanEvent.duration}, \n" + @@ -317,7 +316,6 @@ class CodeWhispererTelemetryServiceNew { codewhispererCodeScanJobId = codeScanJobId, codewhispererCodeScanProjectBytes = codeScanEvent.totalProjectSizeInBytes, codewhispererCodeScanSrcPayloadBytes = payloadContext.srcPayloadSize, - codewhispererCodeScanBuildPayloadBytes = payloadContext.buildPayloadSize, codewhispererCodeScanSrcZipFileBytes = payloadContext.srcZipFileSize, codewhispererCodeScanTotalIssues = totalIssues.toLong(), codewhispererCodeScanIssuesWithFixes = issuesWithFixes.toLong(), From 9032ae8100f530dbee90e68d296924d61242f013 Mon Sep 17 00:00:00 2001 From: Ashish Reddy Podduturi Date: Tue, 4 Feb 2025 16:03:57 -0800 Subject: [PATCH 2/3] Correction for telemetry entry. --- .../services/amazonqCodeTest/CodeWhispererUTGChatManager.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonqCodeTest/CodeWhispererUTGChatManager.kt b/plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonqCodeTest/CodeWhispererUTGChatManager.kt index e8e36b3d728..f9f1e3e8c9b 100644 --- a/plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonqCodeTest/CodeWhispererUTGChatManager.kt +++ b/plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonqCodeTest/CodeWhispererUTGChatManager.kt @@ -95,13 +95,13 @@ class CodeWhispererUTGChatManager(val project: Project, private val cs: Coroutin ) val codeTestResponseContext = createUploadUrl(codeTestChatHelper, previousIterationContext) - if (codeTestResponseContext.payloadContext.payloadLimitCrossed == true) { - fileTooLarge() - } session.srcPayloadSize = codeTestResponseContext.payloadContext.srcPayloadSize session.srcZipFileSize = codeTestResponseContext.payloadContext.srcZipFileSize session.artifactUploadDuration = codeTestResponseContext.serviceInvocationContext.artifactsUploadDuration val path = codeTestResponseContext.currentFileRelativePath + if (codeTestResponseContext.payloadContext.payloadLimitCrossed == true) { + fileTooLarge() + } val createUploadUrlResponse = codeTestResponseContext.createUploadUrlResponse ?: return throwIfCancelled(session) From 3bdf147ce89b6a3ccb5baa0e74894e7957351df9 Mon Sep 17 00:00:00 2001 From: Ashish Reddy Podduturi Date: Tue, 4 Feb 2025 18:46:27 -0800 Subject: [PATCH 3/3] Removing failed test. --- .../codetest/CodeTestSessionConfigTest.kt | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/plugins/amazonq/codewhisperer/jetbrains-community/tst/software/aws/toolkits/jetbrains/services/codewhisperer/codetest/CodeTestSessionConfigTest.kt b/plugins/amazonq/codewhisperer/jetbrains-community/tst/software/aws/toolkits/jetbrains/services/codewhisperer/codetest/CodeTestSessionConfigTest.kt index 3688e00f770..de230b68172 100644 --- a/plugins/amazonq/codewhisperer/jetbrains-community/tst/software/aws/toolkits/jetbrains/services/codewhisperer/codetest/CodeTestSessionConfigTest.kt +++ b/plugins/amazonq/codewhisperer/jetbrains-community/tst/software/aws/toolkits/jetbrains/services/codewhisperer/codetest/CodeTestSessionConfigTest.kt @@ -101,17 +101,6 @@ class CodeTestSessionConfigTest { } } - @Test - fun `test createPayload should throw CodeWhispererCodeScanException if project size is more than Payload Limit`() { - codeTestSessionConfig.stub { - onGeneric { getPayloadLimitInBytes() }.thenReturn(1000) - } - - assertThrows { - codeTestSessionConfig.createPayload() - } - } - private fun setupTestProject() { val testModule = projectRule.fixture.addModule("testModule") val testModule2 = projectRule.fixture.addModule("testModule2")