Skip to content
Draft
Changes from 2 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
52 changes: 52 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1102,6 +1102,58 @@
</properties>
</profile>

<!-- Profile for testing with HerdDB -->
<profile>
<id>test-herddb-docker</id>
<activation>
<property>
<name>test-herddb-docker</name>
</property>
</activation>
<dependencies>
<dependency>
<groupId>org.herddb</groupId>
<artifactId>herddb-jdbc</artifactId>
<version>0.22.0</version>
<scope>test</scope>
</dependency>
</dependencies>
<properties>
<connection.driver.name>herddb.jdbc.Driver</connection.driver.name>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what about a plain java test since herddb is java? docker is mainly an additional test to enable to test which looks not needed here, wdyt?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For me docker is also fine. The benefit of a docker image is that you drop it and have a very well defined initial status.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the main problem is about adding more jars in the classpath.

I am fine with using in-memory db as well, tests will be probably faster?

we should have both.

I would start with docker in order to not need to spend time in debugging potential problems about re-initialization of the server

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would dependency:unpack the zip/stack and just launch it with a dedicated classloader (no conflict wth openjpa)
Docker is fine but don't expect it to be ran often except on the CI from time to time - this is my main point, only Mark runs docker profiles AFAIK.


<connection.url>jdbc:herddb:server:localhost:7000</connection.url>
<connection.username>sa</connection.username>
<connection.password>hdb</connection.password>
<jdbc.DBDictionary />

<!-- DBCP overrides for testing -->
<dbcp.maxIdle>5</dbcp.maxIdle>
<dbcp.minIdle>0</dbcp.minIdle>

</properties>

<build>
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<configuration>
<images>
<image>
<name>herddb/herddb:latest</name>
<run>
<ports>
<port>7000:7000</port>
</ports>
</run>
</image>
</images>
</configuration>
</plugin>
</plugins>
</build>
</profile>

<!-- Profile for testing with a custom DB using a system jar -->
<!--
For example, to test with Oracle, you might run:
Expand Down