You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by si...@apache.org on 2019/02/09 07:40:10 UTC

[pulsar] branch master updated: [tests] Allow configure integration test suite file using system property (#3558)

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

sijie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git


The following commit(s) were added to refs/heads/master by this push:
     new 9140e3f  [tests] Allow configure integration test suite file using system property (#3558)
9140e3f is described below

commit 9140e3f8667c003a1e780e37bd2bb55db4692e55
Author: Sijie Guo <gu...@gmail.com>
AuthorDate: Sat Feb 9 15:40:05 2019 +0800

    [tests] Allow configure integration test suite file using system property (#3558)
    
    *Motivation*
    
    Sometimes users would like to only execute a set of test suite in command line.
    
    *Modifications*
    
    Make the suite file name configurable in the pom file.
    So people can run a specific test suite using
    ```
    mvn -pl tests/integration -DredirectTestOutputToFile=false -DintegrationTestSuiteFile=pulsar-thread-suite.xml clean test -PintegrationTests
    ```
    
    Also categorize the tests info a few test suites. This would allow us break down
    the integration test job into multiple smaller test jobs.
---
 tests/integration/pom.xml                                  |  6 +++++-
 .../test/resources/{pulsar.xml => pulsar-cli-suite.xml}    |  4 +---
 .../test/resources/{pulsar-process.xml => pulsar-cli.xml}  |  8 +++-----
 .../resources/{pulsar.xml => pulsar-process-suite.xml}     |  2 --
 tests/integration/src/test/resources/pulsar-process.xml    |  8 ++------
 .../test/resources/{pulsar.xml => pulsar-sql-suite.xml}    |  4 +---
 .../src/test/resources/{pulsar.xml => pulsar-sql.xml}      | 14 ++++++--------
 .../test/resources/{pulsar.xml => pulsar-thread-suite.xml} |  2 --
 tests/integration/src/test/resources/pulsar.xml            |  2 ++
 .../resources/{pulsar.xml => tiered-storage-suite.xml}     |  2 --
 10 files changed, 20 insertions(+), 32 deletions(-)

diff --git a/tests/integration/pom.xml b/tests/integration/pom.xml
index 119fce49..a440945 100644
--- a/tests/integration/pom.xml
+++ b/tests/integration/pom.xml
@@ -32,6 +32,10 @@
   <packaging>jar</packaging>
   <name>Apache Pulsar :: Tests :: Integration</name>
 
+  <properties>
+    <integrationTestSuiteFile>pulsar.xml</integrationTestSuiteFile>
+  </properties>
+
   <dependencies>
     <dependency>
       <groupId>org.testng</groupId>
@@ -187,7 +191,7 @@
               </argLine>
               <skipTests>false</skipTests>
               <suiteXmlFiles>
-                <file>src/test/resources/pulsar.xml</file>
+                <file>src/test/resources/${integrationTestSuiteFile}</file>
               </suiteXmlFiles>
               <forkCount>1</forkCount>
             </configuration>
diff --git a/tests/integration/src/test/resources/pulsar.xml b/tests/integration/src/test/resources/pulsar-cli-suite.xml
similarity index 88%
copy from tests/integration/src/test/resources/pulsar.xml
copy to tests/integration/src/test/resources/pulsar-cli-suite.xml
index ac21f4c..2d413a6 100644
--- a/tests/integration/src/test/resources/pulsar.xml
+++ b/tests/integration/src/test/resources/pulsar-cli-suite.xml
@@ -23,8 +23,6 @@
            see {@link https://github.com/cbeust/testng/issues/508} -->
 <suite name="Pulsar Test Suite" parallel="instances" thread-count="1">
     <suite-files>
-        <suite-file path="./pulsar-process.xml" />
-        <suite-file path="./pulsar-thread.xml" />
-        <suite-file path="./tiered-storage.xml" />
+        <suite-file path="./pulsar-cli.xml" />
     </suite-files>
 </suite>
diff --git a/tests/integration/src/test/resources/pulsar-process.xml b/tests/integration/src/test/resources/pulsar-cli.xml
similarity index 77%
copy from tests/integration/src/test/resources/pulsar-process.xml
copy to tests/integration/src/test/resources/pulsar-cli.xml
index 946c2f9..10a2903 100644
--- a/tests/integration/src/test/resources/pulsar-process.xml
+++ b/tests/integration/src/test/resources/pulsar-cli.xml
@@ -19,14 +19,12 @@
 
 -->
 <!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
-<suite name="Pulsar (Process Function Worker) Integration Tests" verbose="2" annotations="JDK">
-    <test name="pulsar-test-suite" preserve-order="true" >
+<suite name="Pulsar CLI Integration Tests" verbose="2" annotations="JDK">
+    <test name="pulsar-cli-test-suite" preserve-order="true" >
         <classes>
             <class name="org.apache.pulsar.tests.integration.cli.CLITest" />
-            <class name="org.apache.pulsar.tests.integration.compaction.TestCompaction" />
-            <class name="org.apache.pulsar.tests.integration.functions.PulsarFunctionsProcessTest" />
-            <class name="org.apache.pulsar.tests.integration.presto.TestBasicPresto" />
             <class name="org.apache.pulsar.tests.integration.cli.HealthcheckTest" />
+            <class name="org.apache.pulsar.tests.integration.compaction.TestCompaction" />
         </classes>
     </test>
 </suite>
diff --git a/tests/integration/src/test/resources/pulsar.xml b/tests/integration/src/test/resources/pulsar-process-suite.xml
similarity index 92%
copy from tests/integration/src/test/resources/pulsar.xml
copy to tests/integration/src/test/resources/pulsar-process-suite.xml
index ac21f4c..34e5534 100644
--- a/tests/integration/src/test/resources/pulsar.xml
+++ b/tests/integration/src/test/resources/pulsar-process-suite.xml
@@ -24,7 +24,5 @@
 <suite name="Pulsar Test Suite" parallel="instances" thread-count="1">
     <suite-files>
         <suite-file path="./pulsar-process.xml" />
-        <suite-file path="./pulsar-thread.xml" />
-        <suite-file path="./tiered-storage.xml" />
     </suite-files>
 </suite>
diff --git a/tests/integration/src/test/resources/pulsar-process.xml b/tests/integration/src/test/resources/pulsar-process.xml
index 946c2f9..7a24ea5 100644
--- a/tests/integration/src/test/resources/pulsar-process.xml
+++ b/tests/integration/src/test/resources/pulsar-process.xml
@@ -19,14 +19,10 @@
 
 -->
 <!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
-<suite name="Pulsar (Process Function Worker) Integration Tests" verbose="2" annotations="JDK">
-    <test name="pulsar-test-suite" preserve-order="true" >
+<suite name="Pulsar Function Process Integration Tests" verbose="2" annotations="JDK">
+    <test name="pulsar-function-process-test-suite" preserve-order="true" >
         <classes>
-            <class name="org.apache.pulsar.tests.integration.cli.CLITest" />
-            <class name="org.apache.pulsar.tests.integration.compaction.TestCompaction" />
             <class name="org.apache.pulsar.tests.integration.functions.PulsarFunctionsProcessTest" />
-            <class name="org.apache.pulsar.tests.integration.presto.TestBasicPresto" />
-            <class name="org.apache.pulsar.tests.integration.cli.HealthcheckTest" />
         </classes>
     </test>
 </suite>
diff --git a/tests/integration/src/test/resources/pulsar.xml b/tests/integration/src/test/resources/pulsar-sql-suite.xml
similarity index 88%
copy from tests/integration/src/test/resources/pulsar.xml
copy to tests/integration/src/test/resources/pulsar-sql-suite.xml
index ac21f4c..b1e5381 100644
--- a/tests/integration/src/test/resources/pulsar.xml
+++ b/tests/integration/src/test/resources/pulsar-sql-suite.xml
@@ -23,8 +23,6 @@
            see {@link https://github.com/cbeust/testng/issues/508} -->
 <suite name="Pulsar Test Suite" parallel="instances" thread-count="1">
     <suite-files>
-        <suite-file path="./pulsar-process.xml" />
-        <suite-file path="./pulsar-thread.xml" />
-        <suite-file path="./tiered-storage.xml" />
+        <suite-file path="./pulsar-sql.xml" />
     </suite-files>
 </suite>
diff --git a/tests/integration/src/test/resources/pulsar.xml b/tests/integration/src/test/resources/pulsar-sql.xml
similarity index 67%
copy from tests/integration/src/test/resources/pulsar.xml
copy to tests/integration/src/test/resources/pulsar-sql.xml
index ac21f4c..7623b76 100644
--- a/tests/integration/src/test/resources/pulsar.xml
+++ b/tests/integration/src/test/resources/pulsar-sql.xml
@@ -19,12 +19,10 @@
 
 -->
 <!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
-<!-- TODO: we have to put suite files in one file to avoid executing TESTNG test suites multiple times.
-           see {@link https://github.com/cbeust/testng/issues/508} -->
-<suite name="Pulsar Test Suite" parallel="instances" thread-count="1">
-    <suite-files>
-        <suite-file path="./pulsar-process.xml" />
-        <suite-file path="./pulsar-thread.xml" />
-        <suite-file path="./tiered-storage.xml" />
-    </suite-files>
+<suite name="Pulsar SQL Integration Tests" verbose="2" annotations="JDK">
+    <test name="pulsar-sql-test-suite" preserve-order="true" >
+        <classes>
+            <class name="org.apache.pulsar.tests.integration.presto.TestBasicPresto" />
+        </classes>
+    </test>
 </suite>
diff --git a/tests/integration/src/test/resources/pulsar.xml b/tests/integration/src/test/resources/pulsar-thread-suite.xml
similarity index 92%
copy from tests/integration/src/test/resources/pulsar.xml
copy to tests/integration/src/test/resources/pulsar-thread-suite.xml
index ac21f4c..6eca6a6 100644
--- a/tests/integration/src/test/resources/pulsar.xml
+++ b/tests/integration/src/test/resources/pulsar-thread-suite.xml
@@ -23,8 +23,6 @@
            see {@link https://github.com/cbeust/testng/issues/508} -->
 <suite name="Pulsar Test Suite" parallel="instances" thread-count="1">
     <suite-files>
-        <suite-file path="./pulsar-process.xml" />
         <suite-file path="./pulsar-thread.xml" />
-        <suite-file path="./tiered-storage.xml" />
     </suite-files>
 </suite>
diff --git a/tests/integration/src/test/resources/pulsar.xml b/tests/integration/src/test/resources/pulsar.xml
index ac21f4c..c0720e0 100644
--- a/tests/integration/src/test/resources/pulsar.xml
+++ b/tests/integration/src/test/resources/pulsar.xml
@@ -23,7 +23,9 @@
            see {@link https://github.com/cbeust/testng/issues/508} -->
 <suite name="Pulsar Test Suite" parallel="instances" thread-count="1">
     <suite-files>
+        <suite-file path="./pulsar-cli.xml" />
         <suite-file path="./pulsar-process.xml" />
+        <suite-file path="./pulsar-sql.xml" />
         <suite-file path="./pulsar-thread.xml" />
         <suite-file path="./tiered-storage.xml" />
     </suite-files>
diff --git a/tests/integration/src/test/resources/pulsar.xml b/tests/integration/src/test/resources/tiered-storage-suite.xml
similarity index 92%
copy from tests/integration/src/test/resources/pulsar.xml
copy to tests/integration/src/test/resources/tiered-storage-suite.xml
index ac21f4c..5b299b7 100644
--- a/tests/integration/src/test/resources/pulsar.xml
+++ b/tests/integration/src/test/resources/tiered-storage-suite.xml
@@ -23,8 +23,6 @@
            see {@link https://github.com/cbeust/testng/issues/508} -->
 <suite name="Pulsar Test Suite" parallel="instances" thread-count="1">
     <suite-files>
-        <suite-file path="./pulsar-process.xml" />
-        <suite-file path="./pulsar-thread.xml" />
         <suite-file path="./tiered-storage.xml" />
     </suite-files>
 </suite>