Skip to content

Commit

Permalink
Merge branch 'code_coverage_fix_edge_cases' of https://github.com/opp…
Browse files Browse the repository at this point in the history
…ia/oppia-android into code_coverage_many_to_one_targets
  • Loading branch information
Rd4dev committed Jul 12, 2024
2 parents aaf3caf + d3eb372 commit 9b5995e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ fun main(vararg args: String) {
ScriptBackgroundCoroutineDispatcher().use { scriptBgDispatcher ->
val processTimeout: Long = args.find { it.startsWith("processTimeout=") }
?.substringAfter("=")
?.toLongOrNull() ?: 10
?.toLongOrNull() ?: 5

val commandExecutor: CommandExecutor = CommandExecutorImpl(
scriptBgDispatcher, processTimeout = processTimeout, processTimeoutUnit = TimeUnit.MINUTES
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,6 @@ class RunCoverageTest {
}
}
""".trimIndent()

System.setOut(PrintStream(outContent))
}

@After
Expand Down Expand Up @@ -198,6 +196,7 @@ class RunCoverageTest {

@Test
fun testRunCoverage_testFileExempted_noCoverage() {
System.setOut(PrintStream(outContent))
val exemptedFilePath = "app/src/main/java/org/oppia/android/app/activity/ActivityComponent.kt"

RunCoverage(
Expand Down Expand Up @@ -1036,7 +1035,7 @@ class RunCoverageTest {

private fun initializeCommandExecutorWithLongProcessWaitTime(): CommandExecutorImpl {
return CommandExecutorImpl(
scriptBgDispatcher, processTimeout = 10, processTimeoutUnit = TimeUnit.MINUTES
scriptBgDispatcher, processTimeout = 5, processTimeoutUnit = TimeUnit.MINUTES
)
}
}

0 comments on commit 9b5995e

Please sign in to comment.