lshift/diffa — pull request #51 by paulj (2012-03-06 00:21:50+00:00)
Title: Improve use of Session Factories in tests

On Mac OS X, the tests fail to complete due to the HibernateDomainDifferenceStoreTest hanging. This appears to be due to there being too many threads.

These threads seem to belong to cache managers, created as a result of new session factories being created. The setup method creates a sessionfactory per test run, and doesn't close it. Each test class also seems to leak a session factory.

This patch ensures factories are closed, and also re-uses the main session factory for the setup method of the DomainDifferenceStoreTest.