This is an automated email from the ASF dual-hosted git repository.

sai_boorlagadda pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git


The following commit(s) were added to refs/heads/develop by this push:
     new b702fb4  GEODE-5212: Added a test task to run Gfsh distributed tests 
(#2164)
b702fb4 is described below

commit b702fb451c119cea944ef33d8ea4973da5e1856c
Author: Sai Boorlagadda <[email protected]>
AuthorDate: Tue Jul 24 16:56:42 2018 -0700

    GEODE-5212: Added a test task to run Gfsh distributed tests (#2164)
    
      * Added a project property 'testCategory' to allow developers
         to run a specific category of tests.
      * Removed duplicate definition for an integrationTest task
---
 gradle/test.gradle | 220 +++++++----------------------------------------------
 1 file changed, 28 insertions(+), 192 deletions(-)

diff --git a/gradle/test.gradle b/gradle/test.gradle
index 878215d..7d94ff2 100644
--- a/gradle/test.gradle
+++ b/gradle/test.gradle
@@ -120,19 +120,9 @@ subprojects {
 
   integrationTest {
     useJUnit {
-      excludeCategories 'org.apache.geode.test.junit.categories.FlakyTest'
-    }
-
-    forkEvery 1
-
-    doFirst {
-      TestPropertiesWriter.writeTestProperties(buildDir, name)
-    }
-    outputs.upToDateWhen{false}
-  }
-
-  integrationTest {
-    useJUnit {
+      if(project.hasProperty("testCategory")) {
+        includeCategories += project.testCategory
+      }
       excludeCategories 'org.apache.geode.test.junit.categories.FlakyTest'
     }
 
@@ -146,6 +136,9 @@ subprojects {
 
   distributedTest {
     useJUnit {
+      if(project.hasProperty("testCategory")) {
+        includeCategories += project.testCategory
+      }
       excludeCategories 'org.apache.geode.test.junit.categories.FlakyTest'
     }
 
@@ -156,11 +149,21 @@ subprojects {
   }
 
   acceptanceTest {
+    useJUnit {
+      if(project.hasProperty("testCategory")) {
+        includeCategories += project.testCategory
+      }
+    }
     forkEvery 1
     outputs.upToDateWhen{false}
   }
 
   uiTest {
+    useJUnit {
+      if(project.hasProperty("testCategory")) {
+        includeCategories += project.testCategory
+      }
+    }
     forkEvery 1
     outputs.upToDateWhen{false}
   }
@@ -186,7 +189,10 @@ subprojects {
 
   task flakyTest(type:Test) {
     useJUnit {
-      includeCategories 'org.apache.geode.test.junit.categories.FlakyTest'
+      if(project.hasProperty("testCategory")) {
+        includeCategories += project.testCategory
+      }
+      includeCategories += 'org.apache.geode.test.junit.categories.FlakyTest'
     }
 
     forkEvery 1
@@ -198,185 +204,15 @@ subprojects {
     outputs.upToDateWhen{false}
   }
 
-  task securityTest(type:Test) {
-    useJUnit {
-      includeCategories 'org.apache.geode.test.junit.categories.SecurityTest'
-    }
-
-    forkEvery 1
-    doFirst {
-      TestPropertiesWriter.writeTestProperties(buildDir, name)
-    }
-
-    reports.junitXml.destination = file "$buildDir/test-reports-security"
-  }
-
-  task clientServerTest(type:Test) {
-    useJUnit {
-      includeCategories 
'org.apache.geode.test.junit.categories.ClientServerTest'
-      excludeCategories 'org.apache.geode.test.junit.categories.FlakyTest'
-    }
-    doFirst {
-      TestPropertiesWriter.writeTestProperties(buildDir, name)
-    }
-    reports.junitXml.destination = file "$buildDir/test-reports-security"
-  }
-
-  task dlockTest(type:Test) {
-    useJUnit {
-      includeCategories 'org.apache.geode.test.junit.categories.DLockTest'
-      excludeCategories 'org.apache.geode.test.junit.categories.FlakyTest'
-    }
-    doFirst {
-      TestPropertiesWriter.writeTestProperties(buildDir, name)
-    }
-    reports.junitXml.destination = file "$buildDir/test-reports-dlock"
-  }
-
-  task backwardCompatibilityTest(type:Test) {
-    useJUnit {
-      includeCategories 
'org.apache.geode.test.junit.categories.BackwardCompatibilityTest'
-      excludeCategories 'org.apache.geode.test.junit.categories.FlakyTest'
-    }
-    doFirst {
-      TestPropertiesWriter.writeTestProperties(buildDir, name)
-    }
-    reports.junitXml.destination = file 
"$buildDir/test-reports-backwardcompatibility"
-  }
-
-  task clientSubscriptionTest(type:Test) {
-    useJUnit {
-      includeCategories 
'org.apache.geode.test.junit.categories.ClientSubscriptionTest'
-      excludeCategories 'org.apache.geode.test.junit.categories.FlakyTest'
-    }
-    doFirst {
-      TestPropertiesWriter.writeTestProperties(buildDir, name)
-    }
-    reports.junitXml.destination = file 
"$buildDir/test-reports-client-subscription"
-  }
-  task queryTest(type:Test) {
-    useJUnit {
-      includeCategories 'org.apache.geode.test.junit.categories.OQLQueryTest'
-      excludeCategories 'org.apache.geode.test.junit.categories.FlakyTest'
-    }
-    doFirst {
-      TestPropertiesWriter.writeTestProperties(buildDir, name)
-    }
-    reports.junitXml.destination = file "$buildDir/test-reports-oql-query"
-  }
-
-  task indexTest(type:Test) {
-    useJUnit {
-      includeCategories 'org.apache.geode.test.junit.categories.OQLIndexTest'
-      excludeCategories 'org.apache.geode.test.junit.categories.FlakyTest'
-    }
-    doFirst {
-      TestPropertiesWriter.writeTestProperties(buildDir, name)
-    }
-    reports.junitXml.destination = file "$buildDir/test-reports-oql-index"
-  }
-
-  task functionServiceTest(type:Test) {
-    useJUnit {
-      includeCategories 
'org.apache.geode.test.junit.categories.FunctionServiceTest'
-      excludeCategories 'org.apache.geode.test.junit.categories.FlakyTest'
-    }
-    doFirst {
-      TestPropertiesWriter.writeTestProperties(buildDir, name)
-    }
-    reports.junitXml.destination = file 
"$buildDir/test-reports-function-service"
-  }
-
-  task membershipTest(type:Test) {
-    useJUnit {
-      includeCategories 'org.apache.geode.test.junit.categories.MembershipTest'
-      excludeCategories 'org.apache.geode.test.junit.categories.FlakyTest'
-    }
-    doFirst {
-      TestPropertiesWriter.writeTestProperties(buildDir, name)
-    }
-    reports.junitXml.destination = file "$buildDir/test-reports-membership"
-  }
-  task luceneTest(type:Test) {
-    useJUnit {
-      includeCategories 'org.apache.geode.test.junit.categories.LuceneTest'
-      excludeCategories 'org.apache.geode.test.junit.categories.FlakyTest'
-    }
-    doFirst {
-      TestPropertiesWriter.writeTestProperties(buildDir, name)
-    }
-    reports.junitXml.destination = file "$buildDir/test-reports-lucene"
-  }
-
-  task aeqTest(type:Test) {
-    useJUnit {
-      includeCategories 'org.apache.geode.test.junit.categories.AEQTest'
-      excludeCategories 'org.apache.geode.test.junit.categories.FlakyTest'
-    }
-    doFirst {
-      TestPropertiesWriter.writeTestProperties(buildDir, name)
-    }
-    reports.junitXml.destination = file "$buildDir/test-reports-aeq"
-  }
-
-
-  task sessionTest(type:Test) {
-    useJUnit {
-      includeCategories 'org.apache.geode.test.junit.categories.SessionTest'
-      excludeCategories 'org.apache.geode.test.junit.categories.FlakyTest'
-    }
-    doFirst {
-      TestPropertiesWriter.writeTestProperties(buildDir, name)
-    }
-    reports.junitXml.destination = file "$buildDir/test-reports-session"
-  }
-
-  task wanTest(type:Test) {
-    useJUnit {
-      includeCategories 'org.apache.geode.test.junit.categories.WanTest'
-      excludeCategories 'org.apache.geode.test.junit.categories.FlakyTest'
-    }
-    doFirst {
-      TestPropertiesWriter.writeTestProperties(buildDir, name)
-    }
-    reports.junitXml.destination = file "$buildDir/test-reports-wan"
-  }
-
-
-  task redisTest(type:Test) {
-    useJUnit {
-      includeCategories 'org.apache.geode.test.junit.categories.RedisTest'
-      excludeCategories 'org.apache.geode.test.junit.categories.FlakyTest'
-    }
-    doFirst {
-      TestPropertiesWriter.writeTestProperties(buildDir, name)
-    }
-    forkEvery 1
-    reports.junitXml.destination = file "$buildDir/test-reports-redis"
-  }
-
-  task restAPITest(type:Test) {
-    useJUnit {
-      includeCategories 'org.apache.geode.test.junit.categories.RestAPITest'
-      excludeCategories 'org.apache.geode.test.junit.categories.FlakyTest'
-    }
-    doFirst {
-      TestPropertiesWriter.writeTestProperties(buildDir, name)
-    }
-    forkEvery 1
-    reports.junitXml.destination = file "$buildDir/test-reports-restAPI"
-  }
+  /*
+   * Don't add tasks for running specific category tests, instead use this
+   * property `testCategory` and set a FQCN of the required category.
+   * Eg: ./gradlew :geode-core:distributedTest 
-PtestCategory=org.apache.geode.test.junit.categories.GfshTest
+   *
+   * This provides developers a way to choose specific test source and test 
category.
+   *
+  */
 
-  task serializationTest(type:Test) {
-    useJUnit {
-      includeCategories 
'org.apache.geode.test.junit.categories.SerializationTest'
-      excludeCategories 'org.apache.geode.test.junit.categories.FlakyTest'
-    }
-    doFirst {
-      TestPropertiesWriter.writeTestProperties(buildDir, name)
-    }
-    reports.junitXml.destination = file "$buildDir/test-reports-serialization"
-  }
 
   // By proving a file with an arbitrary list of test classes, we can select 
only those
   // tests to run. Activated using -Dcustom.tests=<file> customTest

Reply via email to