File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
utbot-framework/src/main/kotlin/org/utbot/engine Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -103,6 +103,7 @@ import kotlinx.coroutines.job
103103import kotlinx.coroutines.yield
104104import org.utbot.framework.plugin.api.UtExecutionSuccess
105105import org.utbot.framework.plugin.api.UtLambdaModel
106+ import org.utbot.framework.plugin.api.UtSandboxFailure
106107import org.utbot.framework.plugin.api.util.executable
107108import org.utbot.fuzzer.toFuzzerType
108109
@@ -431,6 +432,7 @@ class UtBotSymbolicEngine(
431432 fuzzerType = { try { toFuzzerType(methodUnderTest.executable.genericParameterTypes[it]) } catch (_: Throwable ) { null } }
432433 shouldMock = { mockStrategy.eligibleToMock(it, classUnderTest) }
433434 }
435+ val errorStackTraceTracker = Trie (StackTraceElement ::toString)
434436 val coveredInstructionTracker = Trie (Instruction ::id)
435437 val coveredInstructionValues = linkedMapOf<Trie .Node <Instruction >, List <FuzzedValue >>()
436438 var attempts = 0
@@ -493,6 +495,13 @@ class UtBotSymbolicEngine(
493495 coveredInstructionValues[coverageKey] = values
494496 } else {
495497 logger.error { " Coverage is empty for $methodUnderTest with ${values.map { it.model }} " }
498+ val result = concreteExecutionResult.result
499+ if (result is UtSandboxFailure ) {
500+ val stackTraceElements = result.exception.stackTrace.reversed()
501+ if (errorStackTraceTracker.add(stackTraceElements).count > 1 ) {
502+ return @forEach
503+ }
504+ }
496505 }
497506
498507 emit(
You can’t perform that action at this time.
0 commit comments