Liran Zelkha has posted comments on this change. Change subject: core: Add JPA Java infrastructure ......................................................................
Patch Set 14: (1 comment) http://gerrit.ovirt.org/#/c/33835/14/backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/BaseHibernateDAOTestCase.java File backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/BaseHibernateDAOTestCase.java: Line 34: Line 35: HibernateFacade.setEntityManagerFactory(emf); Line 36: } Line 37: Line 38: @After > isn't it related to the fact that HibernateFacade defines the autoCommit as 1. We don't get the spring transaction in the HibernateFacade, so we create a new one. Without this code - the transaction commits, and fails the tests. I have changed some autoCommit behavior (made it static, and set as default false in the test case). 2. Concerning the transactions - once we reach that point, we'll add more infra. My idea is to use injected transactions. Roy is working on a fix for injection support for our DAOs - I plan to build around that. Line 39: public void cleanup() { Line 40: EntityTransaction transaction = HibernateFacade.getEntityManager().getTransaction(); Line 41: if (transaction.isActive()) { Line 42: transaction.rollback(); -- To view, visit http://gerrit.ovirt.org/33835 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ide82bf8cc647426e37dc42a113867c52699c3f0b Gerrit-PatchSet: 14 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Liran Zelkha <lzel...@redhat.com> Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com> Gerrit-Reviewer: Eli Mesika <emes...@redhat.com> Gerrit-Reviewer: Liran Zelkha <lzel...@redhat.com> Gerrit-Reviewer: Moti Asayag <masa...@redhat.com> Gerrit-Reviewer: Oved Ourfali <oourf...@redhat.com> Gerrit-Reviewer: Roy Golan <rgo...@redhat.com> Gerrit-Reviewer: Yair Zaslavsky <yzasl...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches