Skip to content

Reword message for initial stage of test generation #2546

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ object UtTestsDialogProcessor {
private val logger = KotlinLogging.logger {}

enum class ProgressRange(val from : Double, val to: Double) {
SOLVING(from = 0.0, to = 0.9),
INITIALIZATION(from = 0.01, to = 0.1),
SOLVING(from = 0.1, to = 0.9),
CODEGEN(from = 0.9, to = 0.95),
SARIF(from = 0.95, to = 1.0)
}
Expand Down Expand Up @@ -218,7 +219,7 @@ object UtTestsDialogProcessor {
val secondsTimeout = TimeUnit.MILLISECONDS.toSeconds(model.timeout)

indicator.isIndeterminate = false
updateIndicator(indicator, ProgressRange.SOLVING, "Generate tests: read classes", 0.0)
updateIndicator(indicator, ProgressRange.INITIALIZATION, "Generate tests: starting engine", 0.0)

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

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

process.terminateOnException { _ ->
val classpathForClassLoader = buildDirs + classpathList
Expand Down Expand Up @@ -291,6 +293,7 @@ object UtTestsDialogProcessor {
}
else -> simpleApplicationContext
}
updateIndicator(indicator, ProgressRange.INITIALIZATION, fraction = 0.25)
process.createTestGenerator(
buildDirs,
classpath,
Expand All @@ -302,6 +305,7 @@ object UtTestsDialogProcessor {
indicator.isCanceled
})
}
updateIndicator(indicator, ProgressRange.INITIALIZATION, fraction = 1.0)

for (srcClass in model.srcClasses) {
if (indicator.isCanceled) {
Expand Down