diff --git a/utbot-junit-contest/src/main/kotlin/org/utbot/contest/Contest.kt b/utbot-junit-contest/src/main/kotlin/org/utbot/contest/Contest.kt index 7c915bf600..c4f98c5eb6 100644 --- a/utbot-junit-contest/src/main/kotlin/org/utbot/contest/Contest.kt +++ b/utbot-junit-contest/src/main/kotlin/org/utbot/contest/Contest.kt @@ -199,7 +199,7 @@ fun runGeneration( setOptions() //will not be executed in real contest logger.info().bracket("warmup: 1st optional soot initialization and executor warmup (not to be counted in time budget)") { - TestCaseGenerator(listOf(cut.classfileDir.toPath()), classpathString, dependencyPath, JdkInfoService.provide()) + TestCaseGenerator(listOf(cut.classfileDir.toPath()), classpathString, dependencyPath, JdkInfoService.provide(), forceSootReload = false) } logger.info().bracket("warmup (first): kotlin reflection :: init") { prepareClass(ConcreteExecutorPool::class.java, "") @@ -241,7 +241,7 @@ fun runGeneration( val testCaseGenerator = logger.info().bracket("2nd optional soot initialization") { - TestCaseGenerator(listOf(cut.classfileDir.toPath()), classpathString, dependencyPath, JdkInfoService.provide()) + TestCaseGenerator(listOf(cut.classfileDir.toPath()), classpathString, dependencyPath, JdkInfoService.provide(), forceSootReload = false) } @@ -366,8 +366,11 @@ fun runGeneration( controller.job = job //don't start other methods while last method still in progress - while (job.isActive) - yield() + try { + job.join() + } catch (t: Throwable) { + logger.error(t) { "Internal job error" } + } remainingMethodsCount-- }