Add annotation to prevent test invocation twice

Cause: it helps to fix double inversion of muted non-flaky tests result
(KTI-216).
This commit is contained in:
Yunir Salimzyanov
2020-05-19 15:08:32 +03:00
parent a256e75909
commit 8d51b027ed
17 changed files with 62 additions and 43 deletions
@@ -20,7 +20,8 @@ import com.intellij.openapi.util.io.FileUtil
import org.jetbrains.kotlin.codegen.forTestCompile.ForTestCompileRuntime
import org.jetbrains.kotlin.config.KotlinCompilerVersion
import org.jetbrains.kotlin.config.LanguageVersion
import org.jetbrains.kotlin.test.isIgnoredInDatabaseWithLog
import org.jetbrains.kotlin.test.WithMutedInDatabaseRunTest
import org.jetbrains.kotlin.test.runTest
import org.jetbrains.kotlin.test.testFramework.KtUsefulTestCase
import org.jetbrains.kotlin.utils.addIfNotNull
import org.junit.Assert
@@ -29,6 +30,7 @@ import org.xml.sax.helpers.DefaultHandler
import java.io.File
import javax.xml.parsers.SAXParserFactory
@WithMutedInDatabaseRunTest
class KotlinVersionsTest : KtUsefulTestCase() {
fun testVersionsAreConsistent() {
val versionPattern = "(\\d+)\\.(\\d+)(\\.(\\d+)|-SNAPSHOT)?".toRegex()
@@ -143,7 +145,7 @@ class KotlinVersionsTest : KtUsefulTestCase() {
private fun Collection<Any>.areEqual(): Boolean = all(first()::equals)
override fun shouldRunTest(): Boolean {
return super.shouldRunTest() && !isIgnoredInDatabaseWithLog(this)
override fun runTest() {
runTest { super.runTest() }
}
}