File tree 1 file changed +9
-0
lines changed
utbot-framework/src/main/kotlin/org/utbot/engine
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
103
103
import kotlinx.coroutines.yield
104
104
import org.utbot.framework.plugin.api.UtExecutionSuccess
105
105
import org.utbot.framework.plugin.api.UtLambdaModel
106
+ import org.utbot.framework.plugin.api.UtSandboxFailure
106
107
import org.utbot.framework.plugin.api.util.executable
107
108
import org.utbot.fuzzer.toFuzzerType
108
109
@@ -431,6 +432,7 @@ class UtBotSymbolicEngine(
431
432
fuzzerType = { try { toFuzzerType(methodUnderTest.executable.genericParameterTypes[it]) } catch (_: Throwable ) { null } }
432
433
shouldMock = { mockStrategy.eligibleToMock(it, classUnderTest) }
433
434
}
435
+ val errorStackTraceTracker = Trie (StackTraceElement ::toString)
434
436
val coveredInstructionTracker = Trie (Instruction ::id)
435
437
val coveredInstructionValues = linkedMapOf<Trie .Node <Instruction >, List <FuzzedValue >>()
436
438
var attempts = 0
@@ -493,6 +495,13 @@ class UtBotSymbolicEngine(
493
495
coveredInstructionValues[coverageKey] = values
494
496
} else {
495
497
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
+ }
496
505
}
497
506
498
507
emit(
You can’t perform that action at this time.
0 commit comments