Skip to content

Commit a60c657

Browse files
"Generate and Run" action doesn't initiate test run #709
Fix various exceptions around threads/locks/project model modifications Switch from PsiFiles to SmartPsiElementPointers Add logging for exceptions Resolving conflicts
1 parent d9c136a commit a60c657

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

utbot-intellij/src/main/kotlin/org/utbot/intellij/plugin/generator/CodeGenerationController.kt

-4
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@ object CodeGenerationController {
118118
val latch = CountDownLatch(testSetsByClass.size)
119119

120120
val reports = mutableListOf<TestsGenerationReport>()
121-
122121
val testFilesPointers = mutableListOf<SmartPsiElementPointer<PsiFile>>()
123122
val utilClassListener = UtilClassListener()
124123
for (srcClass in testSetsByClass.keys) {
@@ -127,7 +126,6 @@ object CodeGenerationController {
127126
val classPackageName = model.getTestClassPackageNameFor(srcClass)
128127
val testDirectory = allTestPackages[classPackageName] ?: baseTestDirectory
129128
val testClass = createTestClass(srcClass, testDirectory, model) ?: continue
130-
131129
val testFilePointer = SmartPointerManager.getInstance(model.project).createSmartPsiElementPointer(testClass.containingFile)
132130
val cut = psi2KClass[srcClass] ?: error("Didn't find KClass instance for class ${srcClass.name}")
133131
runWriteCommandAction(model.project, "Generate tests with UtBot", null, {
@@ -625,9 +623,7 @@ object CodeGenerationController {
625623
unblockDocument(testClassUpdated.project, editor.document)
626624

627625
// uploading formatted code
628-
629626
val file = filePointer.containingFile
630-
631627
val codeGenerationResultFormatted =
632628
codeGenerationResult.copy(generatedCode = file?.text?: generatedTestsCode)
633629

0 commit comments

Comments
 (0)