You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by ud...@apache.org on 2016/06/16 22:07:17 UTC
[03/17] incubator-geode git commit: GEODE-1374: Run flaky tests in a
separate gradle task
GEODE-1374: Run flaky tests in a separate gradle task
Add a new test task specifically for running tests annotated with
@FlakyTest. This allows us to isolate tests that exhibit
intermittent failures. Other changes include:
- Exclude flaky tests from test, integrationTest, uiTest, and
distributedTest tasks
- Cleanup how tests are found using the minimum set of
include/exclude categories
Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/e516b86b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/e516b86b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/e516b86b
Branch: refs/heads/feature/GEODE-420
Commit: e516b86baf894c08c5b2b080a1d25a25572a8bbd
Parents: fe05214
Author: Anthony Baker <ab...@apache.org>
Authored: Tue Jun 14 09:51:53 2016 -0700
Committer: Udo Kohlmeyer <uk...@pivotal.io>
Committed: Fri Jun 17 08:05:58 2016 +1000
----------------------------------------------------------------------
gradle/test.gradle | 63 +++++++++++++++----------------------------------
1 file changed, 19 insertions(+), 44 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e516b86b/gradle/test.gradle
----------------------------------------------------------------------
diff --git a/gradle/test.gradle b/gradle/test.gradle
index 1d3701f..eb10cad 100644
--- a/gradle/test.gradle
+++ b/gradle/test.gradle
@@ -91,56 +91,32 @@ subprojects {
test {
- include '**/*Test.class'
useJUnit {
includeCategories 'com.gemstone.gemfire.test.junit.categories.UnitTest'
- excludeCategories 'com.gemstone.gemfire.test.junit.categories.IntegrationTest'
- excludeCategories 'com.gemstone.gemfire.test.junit.categories.DistributedTest'
- excludeCategories 'com.gemstone.gemfire.test.junit.categories.PerformanceTest'
- excludeCategories 'com.gemstone.gemfire.test.junit.categories.HydraTest'
- excludeCategories 'com.gemstone.gemfire.test.junit.categories.ContainerTest'
- excludeCategories 'com.gemstone.gemfire.test.junit.categories.UITest'
+ excludeCategories 'com.gemstone.gemfire.test.junit.categories.FlakyTest'
}
- // run each test in its own vm to avoid interference issues if a test doesn't clean up
- // state
- //forkEvery 1
-
doFirst {
writeTestProperties(buildDir, name)
}
}
task integrationTest(type:Test) {
- include '**/*Test.class'
- exclude '**/*DUnitTest.class'
useJUnit {
- excludeCategories 'com.gemstone.gemfire.test.junit.categories.UnitTest'
includeCategories 'com.gemstone.gemfire.test.junit.categories.IntegrationTest'
- excludeCategories 'com.gemstone.gemfire.test.junit.categories.DistributedTest'
- excludeCategories 'com.gemstone.gemfire.test.junit.categories.PerformanceTest'
- excludeCategories 'com.gemstone.gemfire.test.junit.categories.HydraTest'
- excludeCategories 'com.gemstone.gemfire.test.junit.categories.ContainerTest'
- excludeCategories 'com.gemstone.gemfire.test.junit.categories.UITest'
+ excludeCategories 'com.gemstone.gemfire.test.junit.categories.FlakyTest'
}
forkEvery 1
-
doFirst {
writeTestProperties(buildDir, name)
}
}
task uiTest(type:Test) {
- include '**/*Test.class'
useJUnit {
- excludeCategories 'com.gemstone.gemfire.test.junit.categories.UnitTest'
- excludeCategories 'com.gemstone.gemfire.test.junit.categories.IntegrationTest'
- excludeCategories 'com.gemstone.gemfire.test.junit.categories.DistributedTest'
- excludeCategories 'com.gemstone.gemfire.test.junit.categories.PerformanceTest'
- excludeCategories 'com.gemstone.gemfire.test.junit.categories.HydraTest'
- excludeCategories 'com.gemstone.gemfire.test.junit.categories.ContainerTest'
includeCategories 'com.gemstone.gemfire.test.junit.categories.UITest'
+ excludeCategories 'com.gemstone.gemfire.test.junit.categories.FlakyTest'
}
doFirst {
@@ -149,24 +125,22 @@ subprojects {
}
task distributedTest(type:Test) {
- include '**/*Test.class'
-
- // maxParallelForks = 2
- // maxParallelForks = Runtime.runtime.availableProcessors()
-
useJUnit {
- excludeCategories 'com.gemstone.gemfire.test.junit.categories.UnitTest'
- excludeCategories 'com.gemstone.gemfire.test.junit.categories.IntegrationTest'
includeCategories 'com.gemstone.gemfire.test.junit.categories.DistributedTest'
- excludeCategories 'com.gemstone.gemfire.test.junit.categories.PerformanceTest'
- excludeCategories 'com.gemstone.gemfire.test.junit.categories.HydraTest'
- excludeCategories 'com.gemstone.gemfire.test.junit.categories.ContainerTest'
- excludeCategories 'com.gemstone.gemfire.test.junit.categories.UITest'
+ excludeCategories 'com.gemstone.gemfire.test.junit.categories.FlakyTest'
}
-
- //I'm hoping this might deal with SOME OOMEs I've seen
forkEvery 30
-
+ }
+
+ task flakyTest(type:Test) {
+ useJUnit {
+ includeCategories 'com.gemstone.gemfire.test.junit.categories.FlakyTest'
+ }
+
+ forkEvery 1
+ doFirst {
+ writeTestProperties(buildDir, name)
+ }
}
// By proving a file with an arbitrary list of test classes, we can select only those
@@ -240,17 +214,18 @@ subprojects {
})
// Make precheckin task run all validation tests for checking in code.
- task precheckin (dependsOn: [ build, integrationTest, distributedTest ]) {
- description 'Run this task before checking in code to validate changes. This task combines the following tasks: build, integrationTest, and distributedTest'
+ task precheckin (dependsOn: [ build, integrationTest, distributedTest, flakyTest ]) {
+ description 'Run this task before checking in code to validate changes. This task combines the following tasks: build, integrationTest, distributedTest, and flakyTest'
}
check.dependsOn checkMissedTests
- combineReports.mustRunAfter check, test, integrationTest, distributedTest, checkMissedTests
+ combineReports.mustRunAfter check, test, integrationTest, distributedTest, flakyTest, checkMissedTests
build.finalizedBy combineReports
check.finalizedBy combineReports
test.finalizedBy combineReports
integrationTest.finalizedBy combineReports
distributedTest.finalizedBy combineReports
+ flakyTest.finalizedBy combineReports
checkMissedTests.finalizedBy combineReports
}