Skip to content

Commit

Permalink
[perf_tests]Made getListOfPatternsWhichShouldBeIgnored as func for us…
Browse files Browse the repository at this point in the history
…ing ignore patterns from tests

GitOrigin-RevId: 6efacc329db5341091828bc868d2730292c19bd8
  • Loading branch information
nikitaBarkov authored and intellij-monorepo-bot committed Jun 18, 2024
1 parent fd6aba0 commit a84d078
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ open class TeamCityCIServer(
}

override fun isTestFailureShouldBeIgnored(message: String): Boolean {
listOfPatternsWhichShouldBeIgnored.forEach { pattern ->
getListOfPatternsWhichShouldBeIgnored().forEach { pattern ->
if (pattern.containsMatchIn(message)) {
return true
}
Expand All @@ -83,7 +83,7 @@ open class TeamCityCIServer(
}
}

private val listOfPatternsWhichShouldBeIgnored by lazy {
private fun getListOfPatternsWhichShouldBeIgnored(): MutableList<Regex> {
val ignoredPattern = System.getenv("IGNORED_TEST_FAILURE_PATTERN")
logOutput("DEBUG: ignored patterns form ENV $ignoredPattern")
val patterns = mutableListOf(
Expand All @@ -100,7 +100,7 @@ open class TeamCityCIServer(
patterns.add(it.toRegex())
}
}
patterns
return patterns
}

private fun loadProperties(propertiesPath: Path): Map<String, String> =
Expand Down

0 comments on commit a84d078

Please sign in to comment.