From a534bfc32fa1cd45c494e09004ae56a71d2120bd Mon Sep 17 00:00:00 2001 From: Ilya Gorbunov Date: Fri, 16 Nov 2018 21:33:59 +0300 Subject: [PATCH] Move index overflow tests to another test source set To avoid reporting them as ignored and to make it more easy to run them when needed. --- libraries/stdlib/jvm/build.gradle | 18 ++++++++++++++---- .../collections/IndexOverflowJVMTest.kt | 8 -------- 2 files changed, 14 insertions(+), 12 deletions(-) rename libraries/stdlib/jvm/{test => testLongRunning}/collections/IndexOverflowJVMTest.kt (96%) diff --git a/libraries/stdlib/jvm/build.gradle b/libraries/stdlib/jvm/build.gradle index fbb829826ea..4877f630369 100644 --- a/libraries/stdlib/jvm/build.gradle +++ b/libraries/stdlib/jvm/build.gradle @@ -48,6 +48,11 @@ sourceSets { srcDir 'test' } } + longRunningTest { + kotlin { + srcDir 'testLongRunning' + } + } java9 { java { srcDir 'java9' @@ -59,6 +64,7 @@ configurations { commonSources coroutinesExperimentalTestCompile.extendsFrom(testCompile) coroutinesExperimentalMigrationTestCompile.extendsFrom(coroutinesExperimentalTestCompile) + longRunningTestCompile.extendsFrom(testCompile) } dependencies { @@ -238,8 +244,12 @@ compileTestKotlin { } } -test { - if (project.hasProperty("kotlin.stdlib.test.long.sequences")) { - systemProperty("kotlin.stdlib.test.long.sequences", "true") - } +task longRunningTest(type: Test, dependsOn: longRunningTestClasses) { + group = "verification" + testClassesDirs = sourceSets.longRunningTest.output.classesDirs + classpath = sourceSets.longRunningTest.runtimeClasspath } + +if (project.hasProperty("kotlin.stdlib.test.long.running")) { + check.dependsOn(longRunningTest) +} \ No newline at end of file diff --git a/libraries/stdlib/jvm/test/collections/IndexOverflowJVMTest.kt b/libraries/stdlib/jvm/testLongRunning/collections/IndexOverflowJVMTest.kt similarity index 96% rename from libraries/stdlib/jvm/test/collections/IndexOverflowJVMTest.kt rename to libraries/stdlib/jvm/testLongRunning/collections/IndexOverflowJVMTest.kt index d1704d0fce3..1e0e8f06c7d 100644 --- a/libraries/stdlib/jvm/test/collections/IndexOverflowJVMTest.kt +++ b/libraries/stdlib/jvm/testLongRunning/collections/IndexOverflowJVMTest.kt @@ -5,18 +5,10 @@ package test.collections -import org.junit.Assume -import org.junit.Test import kotlin.test.* class IndexOverflowJVMTest { - @BeforeTest - fun checkIsNotIgnored() { - Assume.assumeTrue(System.getProperty("kotlin.stdlib.test.long.sequences")?.toBoolean() ?: false) - } - - companion object { fun repeatCounted(value: T, count: Long = Int.MAX_VALUE + 1L): Sequence = Sequence { object : Iterator {