Skip to content

Commit fd27d55

Browse files
committed
Separate all JVM stress tests into a stressTest gradle task
* ./gradlew :kotlinx-coroutines-core:jvmTest becomes really fast, since it does not run any stress tests. * ./gradlew build still runs all the tests.
1 parent 84b24bd commit fd27d55

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

kotlinx-coroutines-core/build.gradle

+7-4
Original file line numberDiff line numberDiff line change
@@ -76,16 +76,19 @@ jvmTest {
7676
maxHeapSize = '1g'
7777
enableAssertions = true
7878
systemProperty 'java.security.manager', 'kotlinx.coroutines.TestSecurityManager'
79-
exclude '**/*LFStressTest.*'
79+
exclude '**/*StressTest.*'
8080
systemProperty 'kotlinx.coroutines.scheduler.keep.alive.sec', '100000' // any unpark problem hangs test
8181
}
8282

83-
task lockFreedomTest(type: Test, dependsOn: compileTestKotlinJvm) {
83+
task stressTest(type: Test, dependsOn: compileTestKotlinJvm) {
8484
classpath = files { jvmTest.classpath }
8585
testClassesDirs = files { jvmTest.testClassesDirs }
86-
include '**/*LFStressTest.*'
86+
minHeapSize = '1g'
87+
maxHeapSize = '1g'
88+
include '**/*StressTest.*'
8789
enableAssertions = true
8890
testLogging.showStandardStreams = true
91+
systemProperty 'kotlinx.coroutines.scheduler.keep.alive.sec', '100000' // any unpark problem hangs test
8992
}
9093

9194
task jdk16Test(type: Test, dependsOn: [compileTestKotlinJvm, checkJdk16]) {
@@ -102,7 +105,7 @@ task jdk16Test(type: Test, dependsOn: [compileTestKotlinJvm, checkJdk16]) {
102105
jdk16Test.onlyIf { project.properties['stressTest'] != null }
103106

104107
// Always run those tests
105-
task moreTest(dependsOn: [lockFreedomTest, jdk16Test])
108+
task moreTest(dependsOn: [stressTest, jdk16Test])
106109
build.dependsOn moreTest
107110

108111
task testsJar(type: Jar, dependsOn: jvmTestClasses) {

0 commit comments

Comments
 (0)