Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
101 changes: 6 additions & 95 deletions integration-tests/hibernate-reactive-db2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@
<name>Quarkus - Integration Tests - Hibernate Reactive - DB2</name>
<description>Hibernate Reactive related tests running with the DB2 database</description>

<properties>
<reactive-db2.url>vertx-reactive:db2://localhost:50005/hreact</reactive-db2.url>
</properties>

<dependencies>
<dependency>
<groupId>io.quarkus</groupId>
Expand Down Expand Up @@ -92,6 +88,12 @@
<filtering>true</filtering>
</resource>
</resources>
<testResources>
<testResource>
<directory>src/test/resources</directory>
<filtering>true</filtering>
</testResource>
</testResources>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
Expand Down Expand Up @@ -151,97 +153,6 @@
</build>
</profile>

<profile>
<id>docker-db2</id>
<activation>
<property>
<name>start-containers</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<configuration>
<images>
<image>
<name>${db2.image}</name>
<alias>quarkus-test-db2</alias>
<run>
<network>
<mode>bridge</mode>
</network>
<privileged>true</privileged>
<ports>
<port>50005:50000</port>
</ports>
<env>
<DB2INSTANCE>hreact</DB2INSTANCE>
<DB2INST1_PASSWORD>hreact</DB2INST1_PASSWORD>
<DBNAME>hreact</DBNAME>
<LICENSE>accept</LICENSE>
<!-- These help the DB2 container start faster -->
<AUTOCONFIG>false</AUTOCONFIG>
<ARCHIVE_LOGS>false</ARCHIVE_LOGS>
<PERSISTENT_HOME>false</PERSISTENT_HOME>
</env>
<log>
<prefix>DB2:</prefix>
<date>default</date>
<color>cyan</color>
</log>
<wait>
<!-- good docs found at: https://dmp.fabric8.io/#build-healthcheck -->
<log>.*INSTANCE.*</log>
<!-- Unfortunately booting DB2 is slow, needs to set a generous (15m) timeout;
it generally starts in 2-3 minutes, but it's been occasionally slightly above 10m -->
<time>900000</time>
<!-- Kill the container, if it doesn't stop before this given time
duration since a graceful stop was issued -->
<kill>300000</kill>
</wait>
</run>
</image>
</images>
</configuration>
<executions>
<execution>
<id>docker-start</id>
<phase>compile</phase>
<goals>
<goal>stop</goal>
<goal>start</goal>
</goals>
</execution>
<execution>
<id>docker-stop</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>docker-prune</id>
<phase>generate-resources</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>${docker-prune.location}</executable>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>


Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
quarkus.datasource.db-kind=db2
quarkus.datasource.username=hreact
quarkus.datasource.password=hreact

# Hibernate config
#quarkus.hibernate-orm.log.sql=true
quarkus.hibernate-orm.schema-management.strategy=drop-and-create

# Reactive config
quarkus.datasource.reactive=true
quarkus.datasource.reactive.url=${reactive-db2.url}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
${db2.image}
2 changes: 1 addition & 1 deletion integration-tests/jpa-db2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

By default, the tests of this module are disabled.

To run the tests in a standard JVM with DB2 started as a Docker container, you can run the following command:
To run the tests in a standard JVM with DB2 started as a Dev Service, you can run the following command:

```
mvn verify -Dtest-containers -Dstart-containers
Expand Down
91 changes: 6 additions & 85 deletions integration-tests/jpa-db2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@
<name>Quarkus - Integration Tests - JPA - DB2</name>
<description>Module that contains JPA related tests running with the DB2 database</description>

<properties>
<jdbc-db2.url>jdbc:db2://localhost:50005/hreact</jdbc-db2.url>
</properties>

<dependencies>
<dependency>
<groupId>io.quarkus</groupId>
Expand Down Expand Up @@ -101,6 +97,12 @@
<filtering>true</filtering>
</resource>
</resources>
<testResources>
<testResource>
<directory>src/test/resources</directory>
<filtering>true</filtering>
</testResource>
</testResources>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
Expand Down Expand Up @@ -162,87 +164,6 @@
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<configuration>
<images>
<image>
<name>${db2.image}</name>
<alias>quarkus-test-db2</alias>
<run>
<network>
<mode>bridge</mode>
</network>
<privileged>true</privileged>
<ports>
<port>50005:50000</port>
</ports>
<env>
<DB2INSTANCE>hreact</DB2INSTANCE>
<DB2INST1_PASSWORD>hreact</DB2INST1_PASSWORD>
<DBNAME>hreact</DBNAME>
<LICENSE>accept</LICENSE>
<!-- These help the DB2 container start faster -->
<AUTOCONFIG>false</AUTOCONFIG>
<ARCHIVE_LOGS>false</ARCHIVE_LOGS>
<PERSISTENT_HOME>false</PERSISTENT_HOME>
</env>
<log>
<prefix>DB2:</prefix>
<date>default</date>
<color>cyan</color>
</log>
<wait>
<!-- good docs found at: https://dmp.fabric8.io/#build-healthcheck -->
<log>.*INSTANCE.*</log>
<!-- Unfortunately booting DB2 is slow, needs to set a generous (15m) timeout;
it generally starts in 2-3 minutes, but it's been occasionally slightly above 10m -->
<time>900000</time>
<!-- Kill the container, if it doesn't stop before this given time
duration since a graceful stop was issued -->
<kill>300000</kill>
</wait>
</run>
</image>
</images>
</configuration>
<executions>
<execution>
<id>docker-start</id>
<phase>compile</phase>
<goals>
<goal>stop</goal>
<goal>start</goal>
</goals>
</execution>
<execution>
<id>docker-stop</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>docker-prune</id>
<phase>generate-resources</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>${docker-prune.location}</executable>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
quarkus.datasource.db-kind=db2
quarkus.datasource.username=hreact
quarkus.datasource.password=hreact
quarkus.datasource.jdbc.url=${jdbc-db2.url}
quarkus.hibernate-orm.schema-management.strategy=drop-and-create
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
${db2.image}
6 changes: 3 additions & 3 deletions integration-tests/reactive-db2-client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

By default, the tests of this module are disabled.

To run the tests in a standard JVM with DB2 started as a Docker container, you can run the following command:
To run the tests in a standard JVM with DB2 started as a Dev Service, you can run the following command:

```
mvn verify -Dtest-containers -Dstart-containers
Expand All @@ -16,12 +16,12 @@ Additionally, you can generate a native image and run the tests for this native
mvn verify -Dtest-containers -Dstart-containers -Dnative
```

If you don't want to run DB2 as a Docker container, you can start your own DB2 server. It needs to listen on the default port (50005) and have a database called `hreact` accessible to the user `hreact` with the password `hreact`.
If you don't want to run DB2 as a Dev Service, you can start your own DB2 server. It needs to listen on the default port (50005) and have a database called `hreact` accessible to the user `hreact` with the password `hreact`.

You can then run the tests as follows (either with `-Dnative` or not):

```
mvn verify -Dtest-containers
```

If you have specific requirements, you can define a specific connection URL with `-Dreactive-db2.url=vertx-reactive:db2://localhost:50000/hreact`.
If you have specific requirements, you can define a specific connection URL with `-Dquarkus.datasource.reactive.url=vertx-reactive:db2://localhost:50000/hreact`.
Loading
Loading