Skip to content

Commit f83d93b

Browse files
authored
Removed redundant timeout checks and initialization (#1625)
1 parent 31713eb commit f83d93b

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

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

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -310,8 +310,7 @@ open class TestCaseGenerator(
310310
private val halfTimeUserExpectsToWaitInMillis = userTimeout / 2
311311

312312
// If the half is too much for concrete execution, decrease the concrete timeout
313-
var concreteExecutionBudgetInMillis =
314-
min(halfTimeUserExpectsToWaitInMillis, 300L * methodsUnderTestNumber)
313+
val concreteExecutionBudgetInMillis = min(halfTimeUserExpectsToWaitInMillis, 300L * methodsUnderTestNumber)
315314

316315
// The symbolic execution time is the reminder but not longer than checkSolverTimeoutMillis times methods number
317316
val symbolicExecutionTimeout = userTimeout - concreteExecutionBudgetInMillis
@@ -326,14 +325,6 @@ open class TestCaseGenerator(
326325
// Now we calculate the solver timeout. Each method is supposed to get some time in worst-case scenario
327326
val updatedSolverCheckTimeoutMillis = if (symbolicExecutionTimePerMethod < checkSolverTimeoutMillis)
328327
symbolicExecutionTimePerMethod else checkSolverTimeoutMillis
329-
330-
init {
331-
// Update the concrete execution time, if symbolic execution time is small
332-
// because of UtSettings.checkSolverTimeoutMillis
333-
concreteExecutionBudgetInMillis = userTimeout - symbolicExecutionTimeout
334-
require(symbolicExecutionTimeout > 10)
335-
require(concreteExecutionBudgetInMillis > 10)
336-
}
337328
}
338329

339330
private fun updateLifecycle(

0 commit comments

Comments
 (0)