DATAJPA-1284 - Use generated database names in tests.
Use a pseudo-random unique name for the embedded database as recommended in EmbeddedDatabaseBuilder#generateUniqueName for reusable configuration. Original pull request: #257.
This commit is contained in:
committed by
Jens Schauder
parent
a1165dbd15
commit
514a92d30f
@@ -26,7 +26,7 @@
|
||||
|
||||
<bean name="sampleEvaluationContextExtension" class="org.springframework.data.jpa.repository.sample.SampleEvaluationContextExtension"/>
|
||||
|
||||
<jdbc:embedded-database id="dataSource" type="HSQL">
|
||||
<jdbc:embedded-database id="dataSource" type="HSQL" generate-name="true">
|
||||
<jdbc:script execution="INIT" separator="/;" location="classpath:scripts/hsqldb-init.sql"/>
|
||||
<jdbc:script execution="INIT" separator="/;" location="classpath:scripts/schema-stored-procedures.sql"/>
|
||||
</jdbc:embedded-database>
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
<bean id="entityManagerFactory-2" parent="abstractEntityManagerFactory">
|
||||
<property name="persistenceUnitName" value="second" />
|
||||
<property name="dataSource">
|
||||
<jdbc:embedded-database type="HSQL" />
|
||||
<jdbc:embedded-database type="HSQL" generate-name="true"/>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
|
||||
@@ -21,5 +21,5 @@
|
||||
make OpenJPA tests work. Open JPA doesn't work with hsqldb 2.x and runs with
|
||||
1.x instead which doesn't support stored procedures which leads to errors
|
||||
at runtime when the scripts/schema-stored-procedure.sql is executed, therefore we omit the script here. -->
|
||||
<jdbc:embedded-database id="dataSource" type="HSQL" />
|
||||
<jdbc:embedded-database id="dataSource" type="HSQL" generate-name="true"/>
|
||||
</beans>
|
||||
|
||||
Reference in New Issue
Block a user