@@ -82,7 +82,8 @@ object UtTestsDialogProcessor {
82
82
private val logger = KotlinLogging .logger {}
83
83
84
84
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 ),
86
87
CODEGEN (from = 0.9 , to = 0.95 ),
87
88
SARIF (from = 0.95 , to = 1.0 )
88
89
}
@@ -218,7 +219,7 @@ object UtTestsDialogProcessor {
218
219
val secondsTimeout = TimeUnit .MILLISECONDS .toSeconds(model.timeout)
219
220
220
221
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 )
222
223
223
224
// TODO sometimes preClasspathCollectionPromises get stuck, even though all
224
225
// needed dependencies get installed, we need to figure out why that happens
@@ -259,6 +260,7 @@ object UtTestsDialogProcessor {
259
260
val staticMockingConfigured = model.staticsMocking.isConfigured
260
261
261
262
val process = EngineProcess .createBlocking(project, classNameToPath)
263
+ updateIndicator(indicator, ProgressRange .INITIALIZATION , fraction = 0.2 )
262
264
263
265
process.terminateOnException { _ ->
264
266
val classpathForClassLoader = buildDirs + classpathList
@@ -291,6 +293,7 @@ object UtTestsDialogProcessor {
291
293
}
292
294
else -> simpleApplicationContext
293
295
}
296
+ updateIndicator(indicator, ProgressRange .INITIALIZATION , fraction = 0.25 )
294
297
process.createTestGenerator(
295
298
buildDirs,
296
299
classpath,
@@ -302,6 +305,7 @@ object UtTestsDialogProcessor {
302
305
indicator.isCanceled
303
306
})
304
307
}
308
+ updateIndicator(indicator, ProgressRange .INITIALIZATION , fraction = 1.0 )
305
309
306
310
for (srcClass in model.srcClasses) {
307
311
if (indicator.isCanceled) {
0 commit comments