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.
This commit is contained in:
@@ -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)
|
||||
}
|
||||
-8
@@ -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 <T> repeatCounted(value: T, count: Long = Int.MAX_VALUE + 1L): Sequence<T> = Sequence {
|
||||
object : Iterator<T> {
|
||||
Reference in New Issue
Block a user