08e32a4a8b
These new modules run during the '-Passembly' profile and use the new integration test framework that compares all output produced by a connector to expected results that were previously recorded and verified. These integration test modules can be run manually with a simple build of those modules or their parent; only the top-level 'integration-tests' module is run during the assembly profile during builds of the entire codebase.
201 lines
8.3 KiB
XML
201 lines
8.3 KiB
XML
<?xml version="1.0"?>
|
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
<parent>
|
|
<groupId>io.debezium</groupId>
|
|
<artifactId>debezium-mysql-integration-tests</artifactId>
|
|
<version>0.4.0-SNAPSHOT</version>
|
|
<relativePath>../pom.xml</relativePath>
|
|
</parent>
|
|
|
|
<modelVersion>4.0.0</modelVersion>
|
|
<artifactId>debezium-connector-mysql-5.7-integration-tests</artifactId>
|
|
<packaging>jar</packaging>
|
|
<name>Test MySQL 5.7</name>
|
|
<description>Test MySQL 5.7</description>
|
|
|
|
<dependencies>
|
|
<!-- Define the dependencies that all MySQL integration tests will need -->
|
|
<dependency>
|
|
<groupId>mysql</groupId>
|
|
<artifactId>mysql-connector-java</artifactId>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
</dependencies>
|
|
|
|
<properties>
|
|
<version.mysql.server>5.7</version.mysql.server>
|
|
<docker.skip>false</docker.skip>
|
|
<!--
|
|
Specify the properties that will be used for setting up the integration tests' Docker container.
|
|
We'll set some of these as system properties so they are accessible by the integration tests.
|
|
-->
|
|
<database.port>3306</database.port>
|
|
<database.user>mysqluser</database.user>
|
|
<database.password>mysqlpw</database.password>
|
|
</properties>
|
|
|
|
<build>
|
|
<plugins>
|
|
<!-- Do not deploy this during a release -->
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-deploy-plugin</artifactId>
|
|
<configuration>
|
|
<skip>true</skip>
|
|
</configuration>
|
|
</plugin>
|
|
<!-- Do not build a non-test JAR -->
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-jar-plugin</artifactId>
|
|
<executions>
|
|
<execution>
|
|
<id>default-jar</id>
|
|
<phase>none</phase>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>io.fabric8</groupId>
|
|
<artifactId>docker-maven-plugin</artifactId>
|
|
<configuration>
|
|
<watchInterval>500</watchInterval>
|
|
<logDate>default</logDate>
|
|
<verbose>true</verbose>
|
|
<autoPull>always</autoPull>
|
|
<images>
|
|
<!--
|
|
Images based on "mysql/mysql-server" Docker image
|
|
-->
|
|
<image>
|
|
<!-- A Docker image using a partial MySQL installation maintained by MySQL team. -->
|
|
<name>debezium/mysql-server-${version.mysql.server}-test-database</name>
|
|
<alias>database</alias>
|
|
<run>
|
|
<namingStrategy>alias</namingStrategy>
|
|
<env>
|
|
<MYSQL_ROOT_PASSWORD>debezium-rocks</MYSQL_ROOT_PASSWORD>
|
|
<MYSQL_DATABASE>mysql</MYSQL_DATABASE> <!-- database created upon init -->
|
|
<MYSQL_USER>${database.user}</MYSQL_USER>
|
|
<MYSQL_PASSWORD>${database.password}</MYSQL_PASSWORD>
|
|
</env>
|
|
<ports>
|
|
<port>${database.port}:3306</port>
|
|
</ports>
|
|
<log>
|
|
<prefix>mysql</prefix>
|
|
<enabled>true</enabled>
|
|
<color>yellow</color>
|
|
</log>
|
|
<wait>
|
|
<log>MySQL init process done. Ready for start up.</log>
|
|
<time>30000</time> <!-- 30 seconds max -->
|
|
</wait>
|
|
</run>
|
|
<build>
|
|
<from>mysql/mysql-server:${version.mysql.server}</from>
|
|
<assembly>
|
|
<inline>
|
|
<fileSets>
|
|
<fileSet>
|
|
<directory>${project.basedir}/src/test/docker/server</directory>
|
|
<includes>
|
|
<include>my.cnf</include>
|
|
</includes>
|
|
<outputDirectory>etc/mysql</outputDirectory>
|
|
</fileSet>
|
|
<fileSet>
|
|
<directory>${project.basedir}/src/test/docker/init</directory>
|
|
<outputDirectory>docker-entrypoint-initdb.d</outputDirectory>
|
|
</fileSet>
|
|
</fileSets>
|
|
</inline>
|
|
<targetDir>/</targetDir>
|
|
</assembly>
|
|
</build>
|
|
</image>
|
|
</images>
|
|
</configuration>
|
|
<!--
|
|
Connect this plugin to the maven lifecycle around the integration-test phase:
|
|
start the container in pre-integration-test and stop it in post-integration-test.
|
|
-->
|
|
<executions>
|
|
<execution>
|
|
<id>start</id>
|
|
<phase>pre-integration-test</phase>
|
|
<goals>
|
|
<goal>build</goal>
|
|
<goal>start</goal>
|
|
</goals>
|
|
</execution>
|
|
<execution>
|
|
<id>stop</id>
|
|
<phase>post-integration-test</phase>
|
|
<goals>
|
|
<goal>stop</goal>
|
|
</goals>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
<!--
|
|
Unlike surefire, the failsafe plugin ensures 'post-integration-test' phase always runs, even
|
|
when there are failed integration tests. We rely upon this to always shut down the Docker container
|
|
after the integration tests (defined as '*IT.java') are run.
|
|
-->
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-failsafe-plugin</artifactId>
|
|
<executions>
|
|
<execution>
|
|
<id>integration-test</id>
|
|
<goals>
|
|
<goal>integration-test</goal>
|
|
</goals>
|
|
</execution>
|
|
<execution>
|
|
<id>verify</id>
|
|
<goals>
|
|
<goal>verify</goal>
|
|
</goals>
|
|
</execution>
|
|
</executions>
|
|
<configuration>
|
|
<skipTests>${skipITs}</skipTests>
|
|
<enableAssertions>true</enableAssertions>
|
|
<systemPropertyVariables>
|
|
<!-- Make these available to the tests via system properties -->
|
|
<database.hostname>${docker.host.address}</database.hostname>
|
|
<database.port>${database.port}</database.port>
|
|
<database.user>${database.user}</database.user>
|
|
<database.password>${database.password}</database.password>
|
|
<skipLongRunningTests>${skipLongRunningTests}</skipLongRunningTests>
|
|
</systemPropertyVariables>
|
|
</configuration>
|
|
</plugin>
|
|
</plugins>
|
|
<resources>
|
|
<!-- Apply the properties set in the POM to the resource files -->
|
|
<resource>
|
|
<filtering>true</filtering>
|
|
<directory>src/main/resources</directory>
|
|
<includes>
|
|
<include>*</include>
|
|
<include>**/*</include>
|
|
</includes>
|
|
</resource>
|
|
</resources>
|
|
<testResources>
|
|
<testResource>
|
|
<directory>src/test/resources</directory>
|
|
<filtering>true</filtering>
|
|
<includes>
|
|
<include>*</include>
|
|
<include>**/*</include>
|
|
</includes>
|
|
</testResource>
|
|
</testResources>
|
|
</build>
|
|
|
|
</project>
|