Skip to content

Commit 067da31

Browse files
committed
idea 17
[utbot-rd] threading fix [utbot-rd] merge fixes
1 parent a8ff3af commit 067da31

File tree

10 files changed

+154
-153
lines changed

10 files changed

+154
-153
lines changed

gradle.properties

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ kotlin.code.style=official
33
# IU, IC, PC, PY, WS...
44
ideType=IC
55

6-
pythonCommunityPluginVersion=212.5457.59
6+
pythonCommunityPluginVersion=222.4167.37
77
#Version numbers: https://plugins.jetbrains.com/plugin/631-python/versions
8-
pythonUltimatePluginVersion=212.5457.59
8+
pythonUltimatePluginVersion=222.4167.37
99

1010
junit5Version=5.8.0-RC1
1111
junit4Version=4.13.2
@@ -14,7 +14,7 @@ mockitoVersion=3.5.13
1414
z3Version=4.8.9.1
1515
z3JavaApiVersion=4.8.9
1616
sootCommitHash=1f34746
17-
kotlinVersion=1.7.10
17+
kotlinVersion=1.7.20
1818
log4j2Version=2.13.3
1919
coroutinesVersion=1.6.3
2020
collectionsVersion=0.3.4

utbot-framework/src/main/kotlin/org/utbot/framework/process/EngineMain.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ private fun EngineProcessModel.setup(
9797
}
9898
synchronizer.measureExecutionForTermination(createTestGenerator) { params ->
9999
AnalyticsConfigureUtil.configureML()
100-
testGenerator = TestCaseGenerator(buildDir = Paths.get(params.buildDir),
100+
testGenerator = TestCaseGenerator(buildDirs = params.buildDir.map { Paths.get(it) },
101101
classpath = params.classpath,
102102
dependencyPaths = params.dependencyPaths,
103103
jdkInfo = JdkInfo(Paths.get(params.jdkInfo.path), params.jdkInfo.version),

utbot-framework/src/main/kotlin/org/utbot/framework/process/generated/EngineProcessModel.Generated.kt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class EngineProcessModel private constructor(
7373
}
7474

7575

76-
const val serializationHash = -4621310507632233825L
76+
const val serializationHash = 4674749231408610997L
7777

7878
}
7979
override val serializersOwner: ISerializersOwner get() = EngineProcessModel
@@ -1158,7 +1158,7 @@ data class Signature (
11581158
* #### Generated from [EngineProcessModel.kt:26]
11591159
*/
11601160
data class TestGeneratorParams (
1161-
val buildDir: String,
1161+
val buildDir: Array<String>,
11621162
val classpath: String?,
11631163
val dependencyPaths: String,
11641164
val jdkInfo: JdkInfo
@@ -1170,15 +1170,15 @@ data class TestGeneratorParams (
11701170

11711171
@Suppress("UNCHECKED_CAST")
11721172
override fun read(ctx: SerializationCtx, buffer: AbstractBuffer): TestGeneratorParams {
1173-
val buildDir = buffer.readString()
1173+
val buildDir = buffer.readArray {buffer.readString()}
11741174
val classpath = buffer.readNullable { buffer.readString() }
11751175
val dependencyPaths = buffer.readString()
11761176
val jdkInfo = JdkInfo.read(ctx, buffer)
11771177
return TestGeneratorParams(buildDir, classpath, dependencyPaths, jdkInfo)
11781178
}
11791179

11801180
override fun write(ctx: SerializationCtx, buffer: AbstractBuffer, value: TestGeneratorParams) {
1181-
buffer.writeString(value.buildDir)
1181+
buffer.writeArray(value.buildDir) { buffer.writeString(it) }
11821182
buffer.writeNullable(value.classpath) { buffer.writeString(it) }
11831183
buffer.writeString(value.dependencyPaths)
11841184
JdkInfo.write(ctx, buffer, value.jdkInfo)
@@ -1197,7 +1197,7 @@ data class TestGeneratorParams (
11971197

11981198
other as TestGeneratorParams
11991199

1200-
if (buildDir != other.buildDir) return false
1200+
if (!(buildDir contentDeepEquals other.buildDir)) return false
12011201
if (classpath != other.classpath) return false
12021202
if (dependencyPaths != other.dependencyPaths) return false
12031203
if (jdkInfo != other.jdkInfo) return false
@@ -1207,7 +1207,7 @@ data class TestGeneratorParams (
12071207
//hash code trait
12081208
override fun hashCode(): Int {
12091209
var __r = 0
1210-
__r = __r*31 + buildDir.hashCode()
1210+
__r = __r*31 + buildDir.contentDeepHashCode()
12111211
__r = __r*31 + if (classpath != null) classpath.hashCode() else 0
12121212
__r = __r*31 + dependencyPaths.hashCode()
12131213
__r = __r*31 + jdkInfo.hashCode()

utbot-instrumentation/src/main/kotlin/org/utbot/instrumentation/Settings.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ object Settings {
3636
* @see runChildProcessWithDebug
3737
* @see org.utbot.intellij.plugin.process.EngineProcess
3838
*/
39-
const val runIdeaProcessWithDebug = true
39+
const val runIdeaProcessWithDebug = false
4040

4141
var defaultConcreteExecutorPoolSize = 10
4242
}

utbot-intellij/build.gradle.kts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ intellij {
1818

1919
val jvmPlugins = listOf(
2020
"java",
21-
"org.jetbrains.kotlin:212-1.7.10-release-333-IJ5457.46"
21+
"org.jetbrains.kotlin:222-1.7.20-release-201-IJ4167.29"
2222
)
2323

2424
val pythonCommunityPlugins = listOf(
@@ -43,7 +43,7 @@ intellij {
4343
}
4444
)
4545

46-
version.set("212.5712.43")
46+
version.set("222.4167.29")
4747
type.set(ideType)
4848
}
4949

@@ -67,7 +67,7 @@ tasks {
6767

6868
patchPluginXml {
6969
sinceBuild.set("212")
70-
untilBuild.set("221.*")
70+
untilBuild.set("222.*")
7171
}
7272
}
7373

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

Lines changed: 134 additions & 134 deletions
Large diffs are not rendered by default.

utbot-intellij/src/main/kotlin/org/utbot/intellij/plugin/process/EngineProcess.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ class EngineProcess(val lifetime: Lifetime) {
196196
// suppose that only 1 simultaneous test generator process can be executed in idea
197197
// so every time test generator is created - we just overwrite previous
198198
fun createTestGenerator(
199-
buildDir: String,
199+
buildDir: List<String>,
200200
classPath: String?,
201201
dependencyPaths: String,
202202
jdkInfo: JdkInfo,
@@ -205,7 +205,7 @@ class EngineProcess(val lifetime: Lifetime) {
205205
engineModel().isCancelled.set(handler = isCancelled)
206206
engineModel().createTestGenerator.startSuspending(
207207
lifetime,
208-
TestGeneratorParams(buildDir, classPath, dependencyPaths, JdkInfo(jdkInfo.path.pathString, jdkInfo.version))
208+
TestGeneratorParams(buildDir.toTypedArray(), classPath, dependencyPaths, JdkInfo(jdkInfo.path.pathString, jdkInfo.version))
209209
)
210210
}
211211

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
}

utbot-intellij/src/main/kotlin/org/utbot/intellij/plugin/util/RunConfigurationHelper.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ import com.intellij.psi.PsiDocumentManager
2222
import com.intellij.psi.PsiElement
2323
import com.intellij.psi.PsiFile
2424
import com.intellij.psi.SmartPsiElementPointer
25+
import com.intellij.psi.util.childrenOfType
2526
import mu.KotlinLogging
26-
import org.jetbrains.plugins.groovy.lang.psi.util.childrenOfType
2727
import org.utbot.intellij.plugin.models.GenerateTestsModel
2828
import org.utbot.intellij.plugin.util.IntelliJApiHelper.run
2929

utbot-rd/src/main/rdgen/org/utbot/rd/models/EngineProcessModel.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ object EngineProcessModel : Ext(EngineProcessProtocolRoot) {
2424
}
2525

2626
val testGeneratorParams = structdef {
27-
field("buildDir", PredefinedType.string)
27+
field("buildDir", array(PredefinedType.string))
2828
field("classpath", PredefinedType.string.nullable)
2929
field("dependencyPaths", PredefinedType.string)
3030
field("jdkInfo", jdkInfo)

0 commit comments

Comments
 (0)