The Reactive DB2 Client
How to use it
See src/main/java/examples/DB2ClientExamples.java
Testing
Out of the box, the test suite runs a Docker container using TestContainers by default.
Since DB2 container takes about 2 minutes to start, it is good to reuse containers across multiple runs. To container reuse, create a file at ~/.testcontainers.properties and add the following property:
testcontainers.reuse.enable=trueJust run the following Maven command:
mvn testTesting with an external database
If you want to use an external database, you must set the following environment variables:
-
DB2_HOST: The hostname of the machine where DB2 is
-
DB2_PORT: The port DB2 is running on
-
DB2_NAME: The name of the DB2 database instance
-
DB2_USER: The DB2 username
-
DB2_PASS: The DB2 password
If you want to run the automated tests against an external database, you must manually populate it with the data in src/test/resources/init.sql
Testing with Docker
Start a DB2 container with the following script:
./scripts/db2.shIf you want to run the automated tests against this database, you must manually populate it with the data in src/test/resources/init.sql