Skip to content

Commit ed7d870

Browse files
authored
Extract utbot-spring-framework module from utbot-framework (#2570)
* Make `relevantFieldManagers` a dynamic property, since it's Spring-specific Remove `CgContext.relevantFieldManagers` field * Move `springNoConfigApplicationContext` constant from `utbot-testing` to `utbot-spring-test` * Extract `utbot-spring-framework` module from `utbot-framework-module` Remove duplicated `include("utbot-spring-framework")` in `settings.gradle.kts` * Rename `DependencyInjectionFramework` to `SpringModule` and stop implementing `CodeGenerationSettingItem` as it's not a setting * Move `SpringModule` from `utbot-framework` to `utbot-spring-framework` * Remove unused imports, update comments * Introduce `EngineProcessTask` * Use `EngineProcessTask` to call spring analyzer * Make `SpringModule` a `enum`
1 parent 9c122a9 commit ed7d870

File tree

54 files changed

+371
-541
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+371
-541
lines changed

settings.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ if (includeRiderInBuild.toBoolean()) {
5656

5757
include("utbot-ui-commons")
5858

59+
include("utbot-spring-framework")
5960
include("utbot-spring-commons-api")
6061
include("utbot-spring-commons")
6162
include("utbot-spring-analyzer")

utbot-core/src/main/kotlin/org/utbot/common/DynamicProperties.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ interface MutableDynamicProperties<TOwner> : DynamicProperties<TOwner> {
3636
operator fun <T> set(property: DynamicProperty<TOwner, T>, value: T)
3737
}
3838

39+
fun <TOwner, T> MutableDynamicProperties<TOwner>.getOrPut(property: DynamicProperty<TOwner, T>, default: () -> T): T {
40+
if (property !in this) set(property, default())
41+
return getValue(property)
42+
}
43+
3944
fun <TOwner> Iterable<InitialisedDynamicProperty<TOwner, *>>.toMutableDynamicProperties(): MutableDynamicProperties<TOwner> =
4045
DynamicPropertiesImpl<TOwner>().also { properties ->
4146
forEach { properties.add(it) }

utbot-framework/build.gradle

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ plugins {
33
}
44

55
configurations {
6-
fetchSpringAnalyzerJar
7-
fetchSpringCommonsJar
86
fetchInstrumentationJar
97
}
108

@@ -48,23 +46,10 @@ dependencies {
4846
implementation group: 'com.github.UnitTestBot.ksmt', name: 'ksmt-z3', version: ksmtVersion
4947

5048
fetchInstrumentationJar project(path: ':utbot-instrumentation', configuration: 'instrumentationArchive')
51-
52-
implementation project(':utbot-spring-commons-api')
53-
implementation project(':utbot-spring-analyzer')
54-
fetchSpringAnalyzerJar project(path: ':utbot-spring-analyzer', configuration: 'springAnalyzerJar')
55-
fetchSpringCommonsJar project(path: ':utbot-spring-commons', configuration: 'springCommonsJar')
5649
}
5750

5851
processResources {
5952
from(configurations.fetchInstrumentationJar) {
6053
into "lib"
6154
}
62-
63-
from(configurations.fetchSpringAnalyzerJar) {
64-
into "lib"
65-
}
66-
67-
from(configurations.fetchSpringCommonsJar) {
68-
into "lib"
69-
}
7055
}

utbot-framework/src/main/kotlin/org/utbot/framework/assemble/AssembleModelGenerator.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,12 +205,12 @@ class AssembleModelGenerator(private val basePackageName: String) {
205205
is UtClassRefModel,
206206
is UtVoidModel,
207207
is UtEnumConstantModel,
208-
is UtCustomModel -> utModel
208+
is UtCustomModel -> utModel // for example, UtSpringContextModel
209209
is UtLambdaModel -> assembleLambdaModel(utModel)
210210
is UtArrayModel -> assembleArrayModel(utModel)
211211
is UtCompositeModel -> assembleCompositeModel(utModel)
212212
is UtAssembleModel -> assembleAssembleModel(utModel)
213-
// Python, JavaScript, UtSpringContextModel are supposed to be here as well
213+
// Python, JavaScript are supposed to be here as well
214214
else -> utModel
215215
}
216216
} catch (e: AssembleException) {

utbot-framework/src/main/kotlin/org/utbot/framework/codegen/domain/Domain.kt

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -711,47 +711,6 @@ enum class ProjectType {
711711
JavaScript,
712712
}
713713

714-
abstract class DependencyInjectionFramework(
715-
override val id: String,
716-
override val displayName: String,
717-
override val description: String = "Use $displayName as dependency injection framework",
718-
val testFrameworkDisplayName: String,
719-
/**
720-
* Generation Spring specific tests requires special spring test framework being installed,
721-
* so we can use `TestContextManager` from `spring-test` to configure test context in
722-
* spring-analyzer and to run integration tests.
723-
*/
724-
var testFrameworkInstalled: Boolean = false
725-
) : CodeGenerationSettingItem {
726-
var isInstalled = false
727-
728-
companion object : CodeGenerationSettingBox {
729-
override val defaultItem: DependencyInjectionFramework get() = SpringBoot
730-
override val allItems: List<DependencyInjectionFramework> get() = listOf(SpringBoot, SpringBeans)
731-
732-
val installedItems get() = allItems.filter { it.isInstalled }
733-
734-
/**
735-
* Generation Spring specific tests requires special spring test framework being installed,
736-
* so we can use `TestContextManager` from `spring-test` to configure test context in
737-
* spring-analyzer and to run integration tests.
738-
*/
739-
var testFrameworkInstalled: Boolean = false
740-
}
741-
}
742-
743-
object SpringBeans : DependencyInjectionFramework(
744-
id = "spring-beans",
745-
displayName = "Spring Beans",
746-
testFrameworkDisplayName = "spring-test",
747-
)
748-
749-
object SpringBoot : DependencyInjectionFramework(
750-
id = "spring-boot",
751-
displayName = "Spring Boot",
752-
testFrameworkDisplayName = "spring-boot-test",
753-
)
754-
755714
/**
756715
* Extended [UtModel] model with testSet id and execution id.
757716
*

utbot-framework/src/main/kotlin/org/utbot/framework/codegen/domain/builtin/MockitoBuiltins.kt

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,6 @@ internal val mockitoClassId = BuiltinClassId(
2020
simpleName = "Mockito",
2121
)
2222

23-
internal val mockClassId = BuiltinClassId(
24-
canonicalName = "org.mockito.Mock",
25-
simpleName = "Mock",
26-
)
27-
28-
internal val spyClassId = BuiltinClassId(
29-
canonicalName = "org.mockito.Spy",
30-
simpleName = "Spy"
31-
)
32-
33-
internal val injectMocksClassId = BuiltinClassId(
34-
canonicalName = "org.mockito.InjectMocks",
35-
simpleName = "InjectMocks",
36-
)
37-
3823
internal val ongoingStubbingClassId = BuiltinClassId(
3924
canonicalName = "org.mockito.stubbing.OngoingStubbing",
4025
simpleName = "OngoingStubbing",

utbot-framework/src/main/kotlin/org/utbot/framework/codegen/domain/builtin/UtilMethodBuiltins.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ internal class UtilClassFileMethodProvider(language: CodegenLanguage)
278278
val UTIL_CLASS_VERSION = "2.1"
279279
}
280280

281-
internal class TestClassUtilMethodProvider(testClassId: ClassId) : UtilMethodProvider(testClassId)
281+
class TestClassUtilMethodProvider(testClassId: ClassId) : UtilMethodProvider(testClassId)
282282

283283
internal fun selectUtilClassId(codegenLanguage: CodegenLanguage): ClassId =
284284
when (codegenLanguage) {

utbot-framework/src/main/kotlin/org/utbot/framework/codegen/domain/context/CgContext.kt

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ import kotlinx.collections.immutable.PersistentSet
1313
import kotlinx.collections.immutable.persistentListOf
1414
import kotlinx.collections.immutable.persistentMapOf
1515
import kotlinx.collections.immutable.persistentSetOf
16+
import org.utbot.common.DynamicProperty
17+
import org.utbot.common.MutableDynamicProperties
18+
import org.utbot.common.mutableDynamicPropertiesOf
1619
import org.utbot.framework.codegen.domain.UtModelWrapper
1720
import org.utbot.framework.codegen.domain.ProjectType
1821
import org.utbot.framework.codegen.domain.builtin.TestClassUtilMethodProvider
@@ -25,7 +28,6 @@ import org.utbot.framework.codegen.tree.importIfNeeded
2528
import org.utbot.framework.plugin.api.BuiltinClassId
2629
import org.utbot.framework.plugin.api.ClassId
2730
import org.utbot.framework.codegen.services.language.CgLanguageAssistant
28-
import org.utbot.framework.codegen.tree.fieldmanager.CgAbstractClassFieldManager
2931
import org.utbot.framework.plugin.api.CodegenLanguage
3032
import org.utbot.framework.plugin.api.ExecutableId
3133
import org.utbot.framework.plugin.api.FieldId
@@ -38,6 +40,9 @@ import org.utbot.framework.plugin.api.util.isCheckedException
3840
import org.utbot.framework.plugin.api.util.isSubtypeOf
3941
import org.utbot.framework.plugin.api.util.jClass
4042

43+
typealias CgContextProperties = MutableDynamicProperties<CgContext>
44+
typealias CgContextProperty<T> = DynamicProperty<CgContext, T>
45+
4146
/**
4247
* Interface for all code generation context aware entities
4348
*
@@ -243,10 +248,16 @@ interface CgContextOwner {
243248
var successfulExecutionsModels: List<UtModel>
244249

245250
/**
246-
* Managers to process annotated fields of the class under test
247-
* relevant for the current generation type.
251+
* Many of [CgContext] properties are only needed in some specific scenarios
252+
* (e.g. Spring-related properties and parametrized test specific properties).
253+
*
254+
* To avoid overly inflating [CgContext] interface such properties should
255+
* be added as dynamic properties.
256+
*
257+
* @see DynamicProperty
248258
*/
249-
val relevantFieldManagers: MutableList<CgAbstractClassFieldManager>
259+
// TODO make parameterized test specific properties dynamic
260+
val properties: CgContextProperties
250261

251262
fun block(init: () -> Unit): Block {
252263
val prevBlock = currentBlock
@@ -509,8 +520,8 @@ class CgContext(
509520
RuntimeExceptionTestsBehaviour.defaultItem,
510521
override val hangingTestsTimeout: HangingTestsTimeout = HangingTestsTimeout(),
511522
override val enableTestsTimeout: Boolean = true,
512-
override val relevantFieldManagers: MutableList<CgAbstractClassFieldManager> = mutableListOf(),
513523
override var containsReflectiveCall: Boolean = false,
524+
override val properties: CgContextProperties = mutableDynamicPropertiesOf(),
514525
) : CgContextOwner {
515526
override lateinit var statesCache: EnvironmentFieldStateCache
516527
override lateinit var actual: CgVariable
@@ -667,5 +678,6 @@ class CgContext(
667678
hangingTestsTimeout = this.hangingTestsTimeout,
668679
enableTestsTimeout = this.enableTestsTimeout,
669680
containsReflectiveCall = this.containsReflectiveCall,
681+
properties = this.properties,
670682
)
671683
}

utbot-framework/src/main/kotlin/org/utbot/framework/codegen/services/access/CgCallableAccessManager.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ interface CgCallableAccessManager {
8787
operator fun ClassId.get(fieldId: FieldId): CgStaticFieldAccess
8888
}
8989

90-
internal class CgCallableAccessManagerImpl(val context: CgContext) : CgCallableAccessManager,
90+
class CgCallableAccessManagerImpl(val context: CgContext) : CgCallableAccessManager,
9191
CgContextOwner by context {
9292

9393
private val statementConstructor by lazy { getStatementConstructorBy(context) }

utbot-framework/src/main/kotlin/org/utbot/framework/codegen/services/framework/TestFrameworkManager.kt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@ import org.utbot.framework.plugin.api.BuiltinMethodId
2525
import org.utbot.framework.plugin.api.ClassId
2626
import org.utbot.framework.plugin.api.CodegenLanguage
2727
import org.utbot.framework.plugin.api.ConstructorId
28-
import org.utbot.framework.plugin.api.util.SpringModelUtils.extendWithClassId
29-
import org.utbot.framework.plugin.api.util.SpringModelUtils.runWithClassId
30-
import org.utbot.framework.plugin.api.util.SpringModelUtils.springExtensionClassId
3128
import org.utbot.framework.plugin.api.util.booleanArrayClassId
3229
import org.utbot.framework.plugin.api.util.byteArrayClassId
3330
import org.utbot.framework.plugin.api.util.charArrayClassId

utbot-framework/src/main/kotlin/org/utbot/framework/codegen/tree/ConstructorUtils.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ fun CgContextOwner.importIfNeeded(type: ClassId) {
255255
}
256256
}
257257

258-
internal fun CgContextOwner.importIfNeeded(method: MethodId) {
258+
fun CgContextOwner.importIfNeeded(method: MethodId) {
259259
val name = method.name
260260
val packageName = method.classId.packageName
261261
method.takeIf { it.isStatic && packageName != testClassPackageName && packageName != "java.lang" }

utbot-framework/src/main/kotlin/org/utbot/framework/codegen/tree/ututils/UtilClassKind.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ sealed class UtilClassKind(
120120
* @return `null` if [CgContext.utilMethodProvider] is not [UtilClassFileMethodProvider],
121121
* because it means that util methods will be taken from some other provider (e.g. [TestClassUtilMethodProvider]).
122122
*/
123-
internal fun fromCgContextOrNull(context: CgContext): UtilClassKind? {
123+
fun fromCgContextOrNull(context: CgContext): UtilClassKind? {
124124
if (context.requiredUtilMethods.isEmpty()) return null
125125
if (!context.mockFrameworkUsed) {
126126
return RegularUtUtils(context.codegenLanguage)

utbot-framework/src/main/kotlin/org/utbot/framework/plugin/api/TestCaseGenerator.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@ import org.utbot.framework.util.ConflictTriggers
3838
import org.utbot.framework.util.SootUtils
3939
import org.utbot.framework.util.jimpleBody
4040
import org.utbot.framework.util.toModel
41-
import org.utbot.framework.plugin.api.SpringSettings.*
42-
import org.utbot.framework.plugin.api.SpringTestType.*
4341
import org.utbot.instrumentation.ConcreteExecutor
4442
import org.utbot.instrumentation.warmup
4543
import org.utbot.taint.TaintConfigurationProvider

utbot-framework/src/main/kotlin/org/utbot/framework/plugin/api/utils/DependencyPatterns.kt

Lines changed: 0 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
package org.utbot.framework.plugin.api.utils
22

3-
import org.utbot.framework.codegen.domain.DependencyInjectionFramework
43
import org.utbot.framework.codegen.domain.Junit4
54
import org.utbot.framework.codegen.domain.Junit5
6-
import org.utbot.framework.codegen.domain.SpringBeans
7-
import org.utbot.framework.codegen.domain.SpringBoot
85
import org.utbot.framework.codegen.domain.TestFramework
96
import org.utbot.framework.codegen.domain.TestNg
107
import org.utbot.framework.plugin.api.MockFramework
@@ -61,36 +58,6 @@ fun MockFramework.patterns(): Patterns {
6158
return Patterns(moduleLibraryPatterns, libraryPatterns)
6259
}
6360

64-
fun DependencyInjectionFramework.patterns(): Patterns {
65-
val moduleLibraryPatterns = when (this) {
66-
SpringBoot -> springBootModulePatterns
67-
SpringBeans -> springBeansModulePatterns
68-
else -> throw UnsupportedOperationException("Unknown dependency injection framework $this")
69-
}
70-
val libraryPatterns = when (this) {
71-
SpringBoot -> springBootPatterns
72-
SpringBeans -> springBeansPatterns
73-
else -> throw UnsupportedOperationException("Unknown dependency injection framework $this")
74-
}
75-
76-
return Patterns(moduleLibraryPatterns, libraryPatterns)
77-
}
78-
79-
fun DependencyInjectionFramework.testPatterns(): Patterns {
80-
val moduleLibraryPatterns = when (this) {
81-
SpringBoot -> springBootTestModulePatterns
82-
SpringBeans -> springBeansTestModulePatterns
83-
else -> throw UnsupportedOperationException("Unknown dependency injection framework $this")
84-
}
85-
val libraryPatterns = when (this) {
86-
SpringBoot -> springBootTestPatterns
87-
SpringBeans -> springBeansTestPatterns
88-
else -> throw UnsupportedOperationException("Unknown dependency injection framework $this")
89-
}
90-
91-
return Patterns(moduleLibraryPatterns, libraryPatterns)
92-
}
93-
9461
val JUNIT_4_JAR_PATTERN = Regex("junit-4(\\.1[2-9])(\\.[0-9]+)?")
9562
val JUNIT_4_MVN_PATTERN = Regex("junit:junit:4(\\.1[2-9])(\\.[0-9]+)?")
9663
val junit4Patterns = listOf(JUNIT_4_JAR_PATTERN, JUNIT_4_MVN_PATTERN)
@@ -127,32 +94,3 @@ val mockitoModulePatterns = listOf(MOCKITO_BASIC_MODULE_PATTERN)
12794
const val MOCKITO_EXTENSIONS_FOLDER = "mockito-extensions"
12895
const val MOCKITO_MOCKMAKER_FILE_NAME = "org.mockito.plugins.MockMaker"
12996
val MOCKITO_EXTENSIONS_FILE_CONTENT = "mock-maker-inline"
130-
131-
val SPRING_BEANS_JAR_PATTERN = Regex("spring-beans-([0-9]+)(\\.[0-9]+){1,2}")
132-
val SPRING_BEANS_MVN_PATTERN = Regex("org\\.springframework:spring-beans:([0-9]+)(\\.[0-9]+){1,2}")
133-
val springBeansPatterns = listOf(SPRING_BEANS_JAR_PATTERN, SPRING_BEANS_MVN_PATTERN)
134-
135-
val SPRING_BEANS_BASIC_MODULE_PATTERN = Regex("spring-beans")
136-
val springBeansModulePatterns = listOf(SPRING_BEANS_BASIC_MODULE_PATTERN)
137-
138-
val SPRING_BEANS_TEST_JAR_PATTERN = Regex("spring-test-([0-9]+)(\\.[0-9]+){1,2}")
139-
val SPRING_BEANS_TEST_MVN_PATTERN = Regex("org\\.springframework:spring-test:([0-9]+)(\\.[0-9]+){1,2}")
140-
val springBeansTestPatterns = listOf(SPRING_BEANS_TEST_JAR_PATTERN, SPRING_BEANS_TEST_MVN_PATTERN)
141-
142-
val SPRING_BEANS_TEST_BASIC_MODULE_PATTERN = Regex("spring-test")
143-
val springBeansTestModulePatterns = listOf(SPRING_BEANS_TEST_BASIC_MODULE_PATTERN)
144-
145-
val SPRING_BOOT_JAR_PATTERN = Regex("spring-boot-([0-9]+)(\\.[0-9]+){1,2}")
146-
val SPRING_BOOT_MVN_PATTERN = Regex("org\\.springframework\\.boot:spring-boot:([0-9]+)(\\.[0-9]+){1,2}")
147-
val springBootPatterns = listOf(SPRING_BOOT_JAR_PATTERN, SPRING_BOOT_MVN_PATTERN)
148-
149-
val SPRING_BOOT_BASIC_MODULE_PATTERN = Regex("spring-boot")
150-
val springBootModulePatterns = listOf(SPRING_BOOT_BASIC_MODULE_PATTERN)
151-
152-
val SPRING_BOOT_TEST_JAR_PATTERN = Regex("spring-boot-test-([0-9]+)(\\.[0-9]+){1,2}")
153-
val SPRING_BOOT_TEST_MVN_PATTERN = Regex("org\\.springframework\\.boot:spring-boot-test:([0-9]+)(\\.[0-9]+){1,2}")
154-
155-
val springBootTestPatterns = listOf(SPRING_BOOT_TEST_JAR_PATTERN, SPRING_BOOT_TEST_MVN_PATTERN)
156-
157-
val SPRING_BOOT_TEST_BASIC_MODULE_PATTERN = Regex("spring-boot-test")
158-
val springBootTestModulePatterns = listOf(SPRING_BOOT_TEST_BASIC_MODULE_PATTERN)

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

Lines changed: 5 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,14 @@ import org.utbot.framework.plugin.api.util.method
2828
import org.utbot.framework.plugin.api.utils.ClassNameUtils
2929
import org.utbot.framework.plugin.services.JdkInfo
3030
import org.utbot.framework.process.generated.*
31-
import org.utbot.framework.process.generated.BeanAdditionalData
32-
import org.utbot.framework.process.generated.BeanDefinitionData
3331
import org.utbot.framework.process.kryo.KryoHelper
3432
import org.utbot.instrumentation.instrumentation.instrumenter.Instrumenter
3533
import org.utbot.rd.IdleWatchdog
3634
import org.utbot.rd.ClientProtocolBuilder
3735
import org.utbot.rd.RdSettingsContainerFactory
3836
import org.utbot.rd.generated.settingsModel
39-
import org.utbot.rd.terminateOnException
4037
import org.utbot.sarif.RdSourceFindingStrategyFacade
4138
import org.utbot.sarif.SarifReport
42-
import org.utbot.spring.process.SpringAnalyzerProcess
4339
import org.utbot.summary.summarizeAll
4440
import org.utbot.taint.TaintConfigurationProviderUserRules
4541
import java.io.File
@@ -90,27 +86,6 @@ private fun EngineProcessModel.setup(kryoHelper: KryoHelper, watchdog: IdleWatch
9086
)
9187
UtContext.setUtContext(UtContext(classLoader))
9288
}
93-
watchdog.measureTimeForActiveCall(getSpringBeanDefinitions, "Getting Spring bean definitions") { params ->
94-
try {
95-
val springAnalyzerProcess = SpringAnalyzerProcess.createBlocking(params.classpath.toList())
96-
val result = springAnalyzerProcess.terminateOnException { _ ->
97-
springAnalyzerProcess.getBeanDefinitions(
98-
kryoHelper.readObject(params.springSettings)
99-
)
100-
}
101-
springAnalyzerProcess.terminate()
102-
val beanDefinitions = result.beanDefinitions
103-
.map { data ->
104-
val additionalData = data.additionalData?.let { BeanAdditionalData(it.factoryMethodName, it.parameterTypes, it.configClassFqn) }
105-
BeanDefinitionData(data.beanName, data.beanTypeFqn, additionalData)
106-
}
107-
.toTypedArray()
108-
SpringAnalyzerResult(beanDefinitions)
109-
} catch (e: Exception) {
110-
logger.error(e) { "Spring Analyzer crashed, resorting to using empty bean list" }
111-
SpringAnalyzerResult(emptyArray())
112-
}
113-
}
11489
watchdog.measureTimeForActiveCall(createTestGenerator, "Creating Test Generator") { params ->
11590
AnalyticsConfigureUtil.configureML()
11691
Instrumenter.adapter = RdInstrumenter(realProtocol.rdInstrumenterAdapter)
@@ -273,6 +248,11 @@ private fun EngineProcessModel.setup(kryoHelper: KryoHelper, watchdog: IdleWatch
273248
}
274249
GenerateTestReportResult(notifyMessage, statistics, hasWarnings)
275250
}
251+
watchdog.measureTimeForActiveCall(perform, "Performing dynamic task") { params ->
252+
val task = kryoHelper.readObject<EngineProcessTask<Any?>>(params.engineProcessTask)
253+
val result = task.perform(kryoHelper)
254+
kryoHelper.writeObject(result)
255+
}
276256
}
277257

278258
private fun processInitialWarnings(report: TestsGenerationReport, params: GenerateTestReportArgs) {

0 commit comments

Comments
 (0)