Skip to content

Commit 5a97dc0

Browse files
committed
fix persistenceunit for tests
1 parent 50e62c1 commit 5a97dc0

File tree

1 file changed

+14
-26
lines changed

1 file changed

+14
-26
lines changed

src/test/resources/META-INF/persistence.xml

Lines changed: 14 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -10,40 +10,28 @@
1010

1111
<class>info.unterrainer.commons.rdbutils.entities.BasicJpa</class>
1212
<class>info.unterrainer.commons.rdbutils.converters.LocalDateTimeConverter</class>
13-
13+
1414
<properties>
1515
<!-- Hibernate-specific / MariaDB-JDBC-driver specific -->
16-
<property name="javax.persistence.jdbc.driver"
17-
value="org.mariadb.jdbc.Driver" />
18-
<property name="hibernate.connection.driver_class"
19-
value="org.mariadb.jdbc.Driver" />
20-
<property name="hibernate.dialect"
21-
value="org.hibernate.dialect.MariaDBDialect" />
22-
<property name="hibernate.temp.use_jdbc_metadata_defaults"
23-
value="false" />
24-
<property name="hibernate.jdbc.time_zone" value="UTC" />
25-
16+
<property name="javax.persistence.jdbc.driver" value="org.mariadb.jdbc.Driver" />
17+
<property name="hibernate.connection.driver_class" value="org.mariadb.jdbc.Driver" />
18+
<property name="hibernate.dialect" value="org.hibernate.dialect.MariaDBDialect" />
19+
<property name="hibernate.temp.use_jdbc_metadata_defaults" value="false" />
20+
<property name="hibernate.jdbc.time_zone" value="UTC"/>
21+
2622
<property name="hibernate.show_sql" value="false" />
2723
<property name="hibernate.format_sql" value="false" />
2824
<property name="hibernate.c3p0.min_size" value="5" />
2925
<property name="hibernate.c3p0.max_size" value="500" />
30-
<!-- Seconds a Connection can remain pooled but unused before being discarded.
31-
Zero means idle connections never expire. -->
26+
<!-- Seconds a Connection can remain pooled but unused before being discarded. Zero means idle connections never expire. -->
3227
<property name="hibernate.c3p0.timeout" value="300" />
33-
<!-- The size of c3p0’s global PreparedStatement cache over all connections.
34-
Zero means statement caching is turned off. -->
28+
<!-- The size of c3p0’s global PreparedStatement cache over all connections. Zero means statement caching is turned off. -->
3529
<property name="hibernate.c3p0.max_statements" value="500" />
36-
<!-- If this is a number greater than 0, c3p0 will test all idle, pooled
37-
but unchecked-out connections, every this number of seconds. -->
38-
<property name="hibernate.c3p0.idle_test_period"
39-
value="3000" />
40-
<!-- Is set to true, the connection is tested with a simple query before
41-
being returned to a user -->
42-
<property name="hibernate.c3p0.testConnectionOnCheckout"
43-
value="true" />
44-
<property
45-
name="hibernate.c3p0.statementCacheNumDeferredCloseThreads"
46-
value="1" />
30+
<!-- If this is a number greater than 0, c3p0 will test all idle, pooled but unchecked-out connections, every this number of seconds. -->
31+
<property name="hibernate.c3p0.idle_test_period" value="3000" />
32+
<!-- Is set to true, the connection is tested with a simple query before being returned to a user -->
33+
<property name="hibernate.c3p0.testConnectionOnCheckout" value="true" />
34+
<property name="hibernate.c3p0.statementCacheNumDeferredCloseThreads" value="1" />
4735
</properties>
4836
</persistence-unit>
4937
</persistence>

0 commit comments

Comments
 (0)