-
Type: Improvement
-
Status: In Progress
-
Priority: Medium
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: 2.0.0
-
Component/s: appng-testsupport
currently appNG configures a hsqldb Server in the application-testcontext-jpa.xml
If the application environment is running another process (which might be a parallel build) on the same port, the tests will fail.
Instead, you can use an In-Process database on the memory protocol. This is faster and does not require an open port.
Since there is currently no configuration option to change the database type accordingly, I am overwriting the beans in my own testcontext:
<bean id="datasource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"> <constructor-arg type="java.lang.String" value="jdbc:hsqldb:mem://${database:hsql-testdb}" /> </bean> <!-- overriding org/appng/testsupport/application-testcontext-jpa.xml server bean. No longer required --> <bean id="server" class="java.lang.Object" />
see also: http://hsqldb.org/doc/guide/running-chapt.html#rgc_inprocess