FIR/FIR IDE: fix FirFailingTestSuppressor for IDE
We need to have IdeTestIgnoreHandler executed after FirFailingTestSuppressor, otherwise IdeTestIgnoreHandler will suppress exceptions and FirFailingTestSuppressor will throw error saying that file .fir.fail exists but test passes
This commit is contained in:
committed by
teamcityserver
parent
948d9390d6
commit
20d1a84002
+1
-3
@@ -19,9 +19,7 @@ class FirFailingTestSuppressor(testServices: TestServices) : AfterAnalysisChecke
|
||||
return when {
|
||||
failFile.exists() && exceptionFromFir != null -> emptyList()
|
||||
failFile.exists() && exceptionFromFir == null -> {
|
||||
emptyList()
|
||||
// TODO: revert it when `DiagnosisCompilerTestFE10TestdataTestGenerated` supports `*.fir.fail` files
|
||||
// failedAssertions + AssertionError("Fail file exists but no exception was throw. Please remove ${failFile.name}").wrap()
|
||||
failedAssertions + AssertionError("Fail file exists but no exception was throw. Please remove ${failFile.name}").wrap()
|
||||
}
|
||||
else -> failedAssertions
|
||||
}
|
||||
|
||||
+9
-3
@@ -13,8 +13,14 @@ import org.jetbrains.kotlin.idea.fir.low.level.api.compiler.based.IdeTestIgnoreH
|
||||
abstract class AbstractDiagnosisCompilerTestDataTest : AbstractCompilerBasedTest() {
|
||||
override fun TestConfigurationBuilder.configureTest() {
|
||||
baseFirDiagnosticTestConfiguration()
|
||||
useAfterAnalysisCheckers(
|
||||
::IdeTestIgnoreHandler
|
||||
)
|
||||
/* IdeTestIgnoreHandler should be executed after FirFailingTestSuppressor,
|
||||
otherwise IdeTestIgnoreHandler will suppress exceptions and FirFailingTestSuppressor will throw error
|
||||
saying that file .fir.fail exists but test passes
|
||||
*/
|
||||
forTestsMatching("*") {
|
||||
useAfterAnalysisCheckers(
|
||||
::IdeTestIgnoreHandler
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user