Skip to content

Commit 41927a6

Browse files
authored
Fuzzing is not stopped on timeout when symbolic execution is excluded #570 (#574)
1 parent da29a64 commit 41927a6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

utbot-framework/src/main/kotlin/org/utbot/engine/UtBotSymbolicEngine.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ class UtBotSymbolicEngine(
435435
})
436436
}
437437
fuzzedValues.forEach { values ->
438-
if (System.currentTimeMillis() >= until) {
438+
if (controller.job?.isActive == false || System.currentTimeMillis() >= until) {
439439
logger.info { "Fuzzing overtime: $methodUnderTest" }
440440
return@flow
441441
}

utbot-framework/src/main/kotlin/org/utbot/framework/plugin/api/TestFlow.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class TestFlow internal constructor(block: TestFlow.() -> Unit) {
6262
isFuzzingEnabled -> {
6363
when (val value = if (isSymbolicEngineEnabled) (fuzzingValue * generationTimeout).toLong() else generationTimeout) {
6464
0L -> engine.traverse()
65-
generationTimeout -> engine.fuzzing()
65+
generationTimeout -> engine.fuzzing(System.currentTimeMillis() + value)
6666
else -> flowOf(
6767
engine.fuzzing(System.currentTimeMillis() + value),
6868
engine.traverse()

0 commit comments

Comments
 (0)