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
@@ -430,6 +431,7 @@ class UtBotSymbolicEngine(
430
431
parameterNameMap = { index -> names?.getOrNull(index) }
431
432
fuzzerType = { try { toFuzzerType(methodUnderTest.executable.genericParameterTypes[it]) } catch (_: Throwable ) { null } }
432
433
}
434
+ val errorStackTraceTracker = Trie (StackTraceElement ::toString)
433
435
val coveredInstructionTracker = Trie (Instruction ::id)
434
436
val coveredInstructionValues = linkedMapOf<Trie .Node <Instruction >, List <FuzzedValue >>()
435
437
var attempts = 0
@@ -488,6 +490,13 @@ class UtBotSymbolicEngine(
488
490
coveredInstructionValues[coverageKey] = values
489
491
} else {
490
492
logger.error { " Coverage is empty for $methodUnderTest with ${values.map { it.model }} " }
493
+ val result = concreteExecutionResult.result
494
+ if (result is UtSandboxFailure ) {
495
+ val stackTraceElements = result.exception.stackTrace.reversed()
496
+ if (errorStackTraceTracker.add(stackTraceElements).count > 1 ) {
497
+ return @forEach
498
+ }
499
+ }
491
500
}
492
501
493
502
emit(
You can’t perform that action at this time.
0 commit comments