You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by tz...@apache.org on 2020/02/24 10:03:41 UTC
[flink-statefun] 06/06: [FLINK-16159] [build] Add
run-end-to-end-tests Maven profile
This is an automated email from the ASF dual-hosted git repository.
tzulitai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink-statefun.git
commit 633e7fded0eba201a578ff8e135dc686a70f68d6
Author: Tzu-Li (Gordon) Tai <tz...@apache.org>
AuthorDate: Mon Feb 24 16:39:29 2020 +0800
[FLINK-16159] [build] Add run-end-to-end-tests Maven profile
This commit adds a "run-end-to-end-tests" build profile that:
- First builds the base Stateful Functions Docker image
- Runs *ITCase test classes with the failsafe plugin
Now, developers can simply use this to enable running end-to-end tests:
mvn clean verify -Prun-end-to-end-tests
This closes #28.
---
pom.xml | 6 ++++++
statefun-end-to-end-tests/pom.xml | 45 +++++++++++++++++++++++++++++++++++++++
2 files changed, 51 insertions(+)
diff --git a/pom.xml b/pom.xml
index 63e9673..23113a4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -57,6 +57,12 @@ under the License.
<module>statefun-quickstart</module>
<module>statefun-docs</module>
<module>statefun-testutil</module>
+
+ <!--
+ Always build the end-to-end tests module last,
+ since the module builds the base Stateful Functions image with the
+ built project artifacts before running the end-to-end tests.
+ -->
<module>statefun-end-to-end-tests</module>
</modules>
diff --git a/statefun-end-to-end-tests/pom.xml b/statefun-end-to-end-tests/pom.xml
index 54d918d..5a79d9f 100644
--- a/statefun-end-to-end-tests/pom.xml
+++ b/statefun-end-to-end-tests/pom.xml
@@ -31,4 +31,49 @@ under the License.
<modules>
<module>statefun-sanity-itcase</module>
</modules>
+
+ <profiles>
+ <profile>
+ <!--
+ Build profile for running end-to-end tests in this module.
+ This first builds the base Stateful Functions image before running the ITCases.
+ Docker must be installed for this profile to work.
+ -->
+ <id>run-end-to-end-tests</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>exec-maven-plugin</artifactId>
+ <version>1.6.0</version>
+ <executions>
+ <execution>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ <inherited>false</inherited>
+ </execution>
+ </executions>
+ <configuration>
+ <executable>${user.dir}/tools/docker/build-stateful-functions.sh</executable>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-failsafe-plugin</artifactId>
+ <version>2.22.0</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>integration-test</goal>
+ <goal>verify</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
</project>