Skip to content

Commit

Permalink
Fuzzing is not stopped on timeout when symbolic execution is excluded #…
Browse files Browse the repository at this point in the history
  • Loading branch information
Markoutte committed Jul 22, 2022
1 parent da29a64 commit 79bb80f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ class UtBotSymbolicEngine(
})
}
fuzzedValues.forEach { values ->
if (System.currentTimeMillis() >= until) {
if (controller.job?.isActive == false || System.currentTimeMillis() >= until) {
logger.info { "Fuzzing overtime: $methodUnderTest" }
return@flow
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class TestFlow internal constructor(block: TestFlow.() -> Unit) {
isFuzzingEnabled -> {
when (val value = if (isSymbolicEngineEnabled) (fuzzingValue * generationTimeout).toLong() else generationTimeout) {
0L -> engine.traverse()
generationTimeout -> engine.fuzzing()
generationTimeout -> engine.fuzzing(System.currentTimeMillis() + value)
else -> flowOf(
engine.fuzzing(System.currentTimeMillis() + value),
engine.traverse()
Expand Down

0 comments on commit 79bb80f

Please sign in to comment.