Skip to content

Commit 15d624f

Browse files
Reword message for initial stage of test generation (#2546)
1 parent ace9742 commit 15d624f

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ object UtTestsDialogProcessor {
8282
private val logger = KotlinLogging.logger {}
8383

8484
enum class ProgressRange(val from : Double, val to: Double) {
85-
SOLVING(from = 0.0, to = 0.9),
85+
INITIALIZATION(from = 0.01, to = 0.1),
86+
SOLVING(from = 0.1, to = 0.9),
8687
CODEGEN(from = 0.9, to = 0.95),
8788
SARIF(from = 0.95, to = 1.0)
8889
}
@@ -218,7 +219,7 @@ object UtTestsDialogProcessor {
218219
val secondsTimeout = TimeUnit.MILLISECONDS.toSeconds(model.timeout)
219220

220221
indicator.isIndeterminate = false
221-
updateIndicator(indicator, ProgressRange.SOLVING, "Generate tests: read classes", 0.0)
222+
updateIndicator(indicator, ProgressRange.INITIALIZATION, "Generate tests: starting engine", 0.0)
222223

223224
// TODO sometimes preClasspathCollectionPromises get stuck, even though all
224225
// needed dependencies get installed, we need to figure out why that happens
@@ -259,6 +260,7 @@ object UtTestsDialogProcessor {
259260
val staticMockingConfigured = model.staticsMocking.isConfigured
260261

261262
val process = EngineProcess.createBlocking(project, classNameToPath)
263+
updateIndicator(indicator, ProgressRange.INITIALIZATION, fraction = 0.2)
262264

263265
process.terminateOnException { _ ->
264266
val classpathForClassLoader = buildDirs + classpathList
@@ -291,6 +293,7 @@ object UtTestsDialogProcessor {
291293
}
292294
else -> simpleApplicationContext
293295
}
296+
updateIndicator(indicator, ProgressRange.INITIALIZATION, fraction = 0.25)
294297
process.createTestGenerator(
295298
buildDirs,
296299
classpath,
@@ -302,6 +305,7 @@ object UtTestsDialogProcessor {
302305
indicator.isCanceled
303306
})
304307
}
308+
updateIndicator(indicator, ProgressRange.INITIALIZATION, fraction = 1.0)
305309

306310
for (srcClass in model.srcClasses) {
307311
if (indicator.isCanceled) {

0 commit comments

Comments
 (0)