Closed
Description
Description
When tests are not generated stacktrace shown instead of user friendly message.
To Reproduce
IDEA: 2022.2.2
UTBot: build 2022.10.395
Steps to reproduce the behavior:
- Open
org.utbot.examples.algorithms.Graph
from UTBot Java project - Try to generate tests with
Test generation timeout
set to 1 s - When first dialog
Failed to generate unit tests for class Graph
opened, click 'OK'
Expected behavior
- No more error dialogs shown(requested in Unnecessary error window appears when UTbot fails to generate test #980) or user friendly messages shown to user (problem of this case)
- No tests are generated.
Actual behavior
Cannot save tests generation report: error occurred 'List is empty., reason: java.util.NoSuchElementException: List is empty.
at kotlin.collections.CollectionsKt___CollectionsKt.first(_Collections.kt:214)
at org.utbot.framework.process.EngineMainKt$setup$10.invoke(EngineMain.kt:215)
at org.utbot.framework.process.EngineMainKt$setup$10.invoke(EngineMain.kt:186)
at org.utbot.rd.CallsSynchronizer$measureExecutionForTermination$2$1$1.invoke(ClientProcessUtil.kt:79)
at org.utbot.rd.CallsSynchronizer$measureExecutionForTermination$1.invokeSuspend(ClientProcessUtil.kt:69)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:284)
at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:85)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:59)
at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:38)
at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
at org.utbot.rd.CallsSynchronizer.measureExecutionForTermination(ClientProcessUtil.kt:66)
at org.utbot.rd.CallsSynchronizer$measureExecutionForTermination$2$1.invokeSuspend(ClientProcessUtil.kt:78)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:284)
at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:85)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:59)
at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:38)
at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
at org.utbot.rd.CallsSynchronizer$measureExecutionForTermination$2.invoke(ClientProcessUtil.kt:77)
at com.jetbrains.rd.framework.IRdEndpoint$set$1.invoke(TaskInterfaces.kt:182)
at com.jetbrains.rd.framework.IRdEndpoint$set$1.invoke(TaskInterfaces.kt:182)
at com.jetbrains.rd.framework.impl.RdCall.onWireReceived(RdTask.kt:360)
at com.jetbrains.rd.framework.MessageBroker$invoke$2$2.invoke(MessageBroker.kt:57)
at com.jetbrains.rd.framework.MessageBroker$invoke$2$2.invoke(MessageBroker.kt:56)
at com.jetbrains.rd.framework.impl.ProtocolContexts.readMessageContextAndInvoke(ProtocolContexts.kt:148)
at com.jetbrains.rd.framework.MessageBroker$invoke$2.invoke(MessageBroker.kt:56)
at com.jetbrains.rd.framework.MessageBroker$invoke$2.invoke(MessageBroker.kt:54)
at com.jetbrains.rd.util.threading.SingleThreadSchedulerBase.queue$lambda-3(SingleThreadScheduler.kt:41)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:750)
Additional context
Current behavior in release branch described in #980, where both dialogs shown.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done