geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aba...@apache.org
Subject incubator-geode git commit: GEODE-1374: Run flaky tests in a separate gradle task
Date Tue, 14 Jun 2016 16:53:56 GMT
Repository: incubator-geode
Updated Branches:
  refs/heads/feature/GEODE-1374 [created] 3cd63d5cb


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/3cd63d5c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/3cd63d5c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/3cd63d5c

Branch: refs/heads/feature/GEODE-1374
Commit: 3cd63d5cb55f67548d8f543ca031715130aedac5
Parents: de647cd
Author: Anthony Baker <abaker@apache.org>
Authored: Tue Jun 14 09:51:53 2016 -0700
Committer: Anthony Baker <abaker@apache.org>
Committed: Tue Jun 14 09:51:53 2016 -0700

----------------------------------------------------------------------
 gradle/test.gradle | 63 +++++++++++++++----------------------------------
 1 file changed, 19 insertions(+), 44 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3cd63d5c/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
 }


Mime
View raw message