[hibernate-dev] http://ci.hibernate.org/job/hibernate-orm-master/48/

Steve Ebersole steve at hibernate.org
Thu Apr 25 15:53:07 EDT 2013


As far as I can tell there are no tests leaving the SessionFactory open 
in hibernate-core.  I have not tested yet with the other modules, but 
from what I can see the CI builds fail at the point trying to run these 
tests.

Essentially I added a hook in CustomRunner (in 
AfterClassCallbackHandler to be precise) to check the 
SessionFactoryRegistry to make sure there are no still registered 
SessionFactories after a test class is done.  If there are, it logs a 
message and clears the SessionFactoryRegistry.  This is simplistic as 
we still have other resources that need to be checked 
(ServiceRegistries are used independently from SessionFactory quite a 
bit).

This was after I got all tests indicated by Strong to extend 
BaseUnitTestCase that did not previously.  I did have problems with 
org.hibernate.metamodel.source.annotations.xml.mocker.AbstractMockerTest 
and subclasses.  Having it extend BaseUnitTestCase with that 
functionality led to assertion failures in 3 tests:

BasicMockerTest.testEntityWithEntityMappingsConfiguration
OverrideTest.testPersistenceUnitDefaultsCascadePersistInAnnotation
OverrideTest.testPersistenceUnitMetadataMetadataComplete

Which is odd, because those tests don't even deal with a SessionFactory.

As for checking that created ServiceRegistry instances get cleaned up, 
not sure how we can check that.

Another thing we should do is to exclude the metamodel tests currently 
on master.  After that, I am out of ideas...

On Thu 25 Apr 2013 05:28:35 AM CDT, Sanne Grinovero wrote:
> On 25 April 2013 09:04, Strong Liu <stliu at hibernate.org> wrote:
>> Sanne,
>>
>> is it possible that you give me ssh access to the ci server?
>
> Sure; I'm adding Strong, if anyone else wants root access just send me
> your public key using your redhat account.
>
> Cheers,
> Sanne


More information about the hibernate-dev mailing list