|
The rebuildSessionFactory method get called when a test fails, and the test system recreates the service and sessionFactory to ensure a clean setup for the next test.
The rebuildSessionFactory doesn't call serviceRegistry.destroy(), which in turn leaves a number of resources hanging around, including idle database connections, until the entire suite completes. Based upon review of logs this is between 150 and 200 service registries for the hibernate core test suite complete run.
|