-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
I tried to updated hibernate but tests started to fail. Once we have updated hibernate we can also update the java ee API versions.
Ref: #563
With 5.4.20.Final multiple tests fail with this error:
[ERROR] ch.puzzle.itc.mobiliar.test.PersistingEntityBuilderTest.testAmw Time elapsed: 0.846 s <<< ERROR!
javax.persistence.PersistenceException:
org.hibernate.HibernateException: Illegal attempt to associate a collection with two open sessions. Collection : [ch.puzzle.itc.mobiliar.business.resourcegroup.entity.ResourceEntity.consumedMasterRelations#1]
Collection contents: [[]]
at ch.puzzle.itc.mobiliar.test.PersistingEntityBuilderTest.testAmw(PersistingEntityBuilderTest.java:80)
Caused by: org.hibernate.HibernateException:
Illegal attempt to associate a collection with two open sessions. Collection : [ch.puzzle.itc.mobiliar.business.resourcegroup.entity.ResourceEntity.consumedMasterRelations#1]
Collection contents: [[]]
at ch.puzzle.itc.mobiliar.test.PersistingEntityBuilderTest.testAmw(PersistingEntityBuilderTest.java:80)
With 5.3.18.Final all persistence tests fail with:
Cannot mock/spy class org.hibernate.internal.SessionImpl
Mockito cannot mock/spy because :
- final class
at ch.puzzle.itc.mobiliar.business.template.control.TemplatesScreenDomainServicePersistenceTest.before(TemplatesScreenDomainServicePersistenceTest.java:56)
Maybe it has to do with how we initialize the persistence context during tests?
Metadata
Metadata
Assignees
Labels
No labels