Improve JPA related test cases to avoid initializing a new EntityManagerFactory for each test

Description

For the SessionFactory case, we have OgmTestCase and OgmTestRunner which avoids creating a new SessionFactory for each test method.

As for JPA related tests, we only have JpaTestCase which initializes a new EntityManagerFactory for each test method.

This is especially problematic for Cassandra as connecting to the cluster is very slow so reconnecting to the cluster for each test method costs us a lot of time.

Environment

None

Assignee

Guillaume Smet

Reporter

Guillaume Smet

Labels

None

Feedback Requested

None

Feedback Requested By

None

backPortable

None

Suitable for new contributors

None

backportDecision

None

backportReEvaluate

None

Components

Sprint

None

Fix versions

Priority

Major
Configure