minor: script some test cases to speedup parallel execution
This commit is contained in:
committed by
Space Team
parent
3e5be0909a
commit
7db9f9c3ae
+3
-1
@@ -367,7 +367,7 @@ class JvmIdeServicesTest : TestCase() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class LegacyReplTestLong : TestCase() {
|
class LegacyReplTestLong1 : TestCase() {
|
||||||
fun test256Evals() {
|
fun test256Evals() {
|
||||||
JvmTestRepl()
|
JvmTestRepl()
|
||||||
.use { repl ->
|
.use { repl ->
|
||||||
@@ -397,7 +397,9 @@ class LegacyReplTestLong : TestCase() {
|
|||||||
assertEquals(evaluated.toString(), evals, (evaluated?.result as ResultValue.Value?)?.value)
|
assertEquals(evaluated.toString(), evals, (evaluated?.result as ResultValue.Value?)?.value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class LegacyReplTestLong2 : TestCase() {
|
||||||
fun testReplSlowdownKt22740() {
|
fun testReplSlowdownKt22740() {
|
||||||
JvmTestRepl()
|
JvmTestRepl()
|
||||||
.use { repl ->
|
.use { repl ->
|
||||||
|
|||||||
+38
-36
@@ -506,42 +506,6 @@ class ReplCompletionAndErrorsAnalysisTest : TestCase() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
|
||||||
fun testLongRunningCompilationWithReceiver() = test {
|
|
||||||
// This test normally completes in about 8-13s
|
|
||||||
// Removing skip* configuration parameters should slow down the test (2-3 times)
|
|
||||||
|
|
||||||
val conf = ScriptCompilationConfiguration {
|
|
||||||
jvm {
|
|
||||||
updateClasspath(classpathFromClass<TestReceiver1>())
|
|
||||||
}
|
|
||||||
implicitReceivers(TestReceiver1::class, TestReceiver2::class)
|
|
||||||
skipExtensionsResolutionForImplicits(KotlinType(TestReceiver1::class))
|
|
||||||
skipExtensionsResolutionForImplicitsExceptInnermost(KotlinType(TestReceiver2::class))
|
|
||||||
}
|
|
||||||
|
|
||||||
val writer = System.out.writer()
|
|
||||||
for (i in 1..200) {
|
|
||||||
run(longCompilationRun(writer, i, conf))
|
|
||||||
run {
|
|
||||||
compilationConfiguration = conf
|
|
||||||
|
|
||||||
code = """
|
|
||||||
val x = xyz
|
|
||||||
""".trimIndent()
|
|
||||||
cursor = 11
|
|
||||||
|
|
||||||
expect {
|
|
||||||
completions.mode = ComparisonType.EQUALS
|
|
||||||
addCompletion("xyz1", "xyz1", "Int", "property")
|
|
||||||
addCompletion("xyz2", "xyz2", "Int", "property")
|
|
||||||
}
|
|
||||||
|
|
||||||
loggingInfo = CSVLoggingInfo(complete = CSVLoggingInfoItem(writer, i, "complete;"))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private val setupDefaultImportsCompletionRun: TestRunConfigurator = {
|
private val setupDefaultImportsCompletionRun: TestRunConfigurator = {
|
||||||
compilationConfiguration = ScriptCompilationConfiguration {
|
compilationConfiguration = ScriptCompilationConfiguration {
|
||||||
defaultImports(listOf("kotlin.math.atan"))
|
defaultImports(listOf("kotlin.math.atan"))
|
||||||
@@ -630,3 +594,41 @@ private fun longCompletionRun(writer: Writer, i: Int, conf: ScriptCompilationCon
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class ReplCompletionAndErrorsAnalysisLongRunningTest1 : TestCase() {
|
||||||
|
|
||||||
|
@Test
|
||||||
|
fun testLongRunningCompilationWithReceiver() = test {
|
||||||
|
// This test normally completes in about 8-13s
|
||||||
|
// Removing skip* configuration parameters should slow down the test (2-3 times)
|
||||||
|
|
||||||
|
val conf = ScriptCompilationConfiguration {
|
||||||
|
jvm {
|
||||||
|
updateClasspath(classpathFromClass<TestReceiver1>())
|
||||||
|
}
|
||||||
|
implicitReceivers(TestReceiver1::class, TestReceiver2::class)
|
||||||
|
skipExtensionsResolutionForImplicits(KotlinType(TestReceiver1::class))
|
||||||
|
skipExtensionsResolutionForImplicitsExceptInnermost(KotlinType(TestReceiver2::class))
|
||||||
|
}
|
||||||
|
|
||||||
|
val writer = System.out.writer()
|
||||||
|
for (i in 1..200) {
|
||||||
|
run(longCompilationRun(writer, i, conf))
|
||||||
|
run {
|
||||||
|
compilationConfiguration = conf
|
||||||
|
|
||||||
|
code = """
|
||||||
|
val x = xyz
|
||||||
|
""".trimIndent()
|
||||||
|
cursor = 11
|
||||||
|
|
||||||
|
expect {
|
||||||
|
completions.mode = ComparisonType.EQUALS
|
||||||
|
addCompletion("xyz1", "xyz1", "Int", "property")
|
||||||
|
addCompletion("xyz2", "xyz2", "Int", "property")
|
||||||
|
}
|
||||||
|
|
||||||
|
loggingInfo = CSVLoggingInfo(complete = CSVLoggingInfoItem(writer, i, "complete;"))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user