Skip to content

Commit b8eba33

Browse files
committed
[utbot-rd]
threading fix
1 parent 87567e6 commit b8eba33

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

utbot-intellij/src/main/kotlin/org/utbot/intellij/plugin/sarif/SarifReportIdea.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import org.utbot.common.PathUtil.classFqnToPath
44
import org.utbot.framework.plugin.api.UtMethodTestSet
55
import org.utbot.intellij.plugin.ui.utils.getOrCreateSarifReportsPath
66
import com.intellij.openapi.vfs.VfsUtil
7+
import org.jetbrains.kotlin.idea.util.application.runWriteAction
78
import org.utbot.framework.plugin.api.ClassId
89
import org.utbot.intellij.plugin.models.GenerateTestsModel
910
import org.utbot.intellij.plugin.process.EngineProcess
@@ -28,7 +29,7 @@ object SarifReportIdea {
2829
val reportFilePath = sarifReportsPath.resolve("${classFqnToPath(classFqn)}Report.sarif")
2930

3031
// creating report related directory
31-
VfsUtil.createDirectoryIfMissing(reportFilePath.parent.toString())
32+
runWriteAction { VfsUtil.createDirectoryIfMissing(reportFilePath.parent.toString()) }
3233

3334
proc.writeSarif(reportFilePath, testSetsId, generatedTestsCode, sourceFinding)
3435
}

0 commit comments

Comments
 (0)