Moti Asayag 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 over-protection over the defined behavior on BaseDAOTestCase, in which each tests runs on its own transaction and at the end of each test the transaction is rolledback ? It should be taken care off by the inherited annotation on BaseDAOTestCase: @RunWith(SpringJUnit4ClassRunner.class) @TestExecutionListeners({ TransactionalTestExecutionListener.class }) @ContextConfiguration(loader = CustomizedContextLoader.class) @Transactional public abstract class BaseDAOTestCase { ... } Hence manual revert of test changes can be spared, i.e.: http://gerrit.ovirt.org/#/c/33836/16/backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/BookmarkDAOTest.java,cm 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 <[email protected]> Gerrit-Reviewer: Allon Mureinik <[email protected]> Gerrit-Reviewer: Eli Mesika <[email protected]> Gerrit-Reviewer: Liran Zelkha <[email protected]> Gerrit-Reviewer: Moti Asayag <[email protected]> Gerrit-Reviewer: Oved Ourfali <[email protected]> Gerrit-Reviewer: Roy Golan <[email protected]> Gerrit-Reviewer: Yair Zaslavsky <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
