Skip to content

Commit

Permalink
Timeout increased
Browse files Browse the repository at this point in the history
  • Loading branch information
DaniilStepanov committed Aug 17, 2023
1 parent 94998e0 commit 433d423
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,16 @@ class InstrumentationProcessRunner(
listOf(instrumentedProcessClassName)
}

private fun createWorkerProcessArgs(rdPort: Int, timeout: Int): List<String> =
listOf("-cp", testingProjectClasspath) + listOf("-t", "$timeout") + listOf("-p", "$rdPort")
private fun createWorkerProcessArgs(rdPort: Int): List<String> =
listOf("-cp", testingProjectClasspath) +
listOf("-t", "${InstrumentationModuleConstants.concreteExecutorProcessTimeout}") +
listOf("-p", "$rdPort")

suspend fun init(parentLifetime: Lifetime) {
val processLifetime = LifetimeDefinition(parentLifetime)
lifetime = processLifetime
val rdPort = NetUtils.findFreePort(0)
val workerCommand = jvmArgs + createWorkerProcessArgs(rdPort, 60)
val workerCommand = jvmArgs + createWorkerProcessArgs(rdPort)
val pb = ProcessBuilder(workerCommand).inheritIO()
val process = pb.start()
rdProcessRunner =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ object InstrumentationModuleConstants {

//Timeout for method execution
val testExecutionTimeout = 10.seconds
//Timeout for executor process waiting (should be in seconds)
const val concreteExecutorProcessTimeout = 120
//If something gone wrong with RD
const val triesToRecreateExecutorRdProcess = 3
//Rollback strategy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ internal class CyclesTest : JavaMethodTestRunner() {
}

@Test
@Disabled("CancellationException. Passing with increased timeout")
fun moveToExceptionTest() {
checkDiscoveredPropertiesWithExceptions(
Cycles::moveToException,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ internal class RecursionTest : JavaMethodTestRunner() {
}

@Test
@Disabled("CancellationException. Probably test executor issue. Investigate")
fun recursionWithExceptionTest() {
checkDiscoveredPropertiesWithExceptions(
Recursion::recursionWithException,
Expand Down

0 comments on commit 433d423

Please sign in to comment.