diff --git a/extend/src/test/functional/AlertTest.java b/extend/src/test/functional/AlertTest.java index 862ab56cff..26f4098bb3 100644 --- a/extend/src/test/functional/AlertTest.java +++ b/extend/src/test/functional/AlertTest.java @@ -28,15 +28,10 @@ ***********************************************************************/ package test.functional; -//import org.compiere.model.I_AD_Alert; -//import org.compiere.model.I_AD_AlertProcessor; import org.compiere.model.MAlert; -import org.compiere.model.PO; -import org.compiere.model.X_AD_Alert; import org.compiere.model.X_AD_AlertProcessor; import org.compiere.util.CLogger; import org.compiere.util.Env; -import org.compiere.util.Trx; import test.AdempiereTestCase; @@ -58,16 +53,14 @@ public class AlertTest extends AdempiereTestCase */ public void testAlertCreation() throws Exception { - Trx trx = Trx.get(Trx.createTrxName("Test"), true); - trx.start(); - log.info("trx = " + trx.toString()); + log.info("trx = " + getTrxName()); boolean resultSave = false; //----- Old way: - MAlert alertOldWay = new MAlert(Env.getCtx(), 100, trx.getTrxName()); + MAlert alertOldWay = new MAlert(Env.getCtx(), 100, getTrxName()); log.info(alertOldWay.toString()); - X_AD_AlertProcessor alertProcessorOldWay = new X_AD_AlertProcessor(Env.getCtx(), alertOldWay.getAD_AlertProcessor_ID(), trx.getTrxName()); + X_AD_AlertProcessor alertProcessorOldWay = new X_AD_AlertProcessor(Env.getCtx(), alertOldWay.getAD_AlertProcessor_ID(), getTrxName()); log.info("alertProcessorOldWay.getAD_AlertProcessor_ID = " + alertProcessorOldWay.getAD_AlertProcessor_ID()); alertOldWay.setDescription("Trifon test"); @@ -95,8 +88,7 @@ public class AlertTest extends AdempiereTestCase System.out.println("New value of Description = " + alert.getDescription()); */ - trx.commit(); - trx.close(); + commit(); } } diff --git a/extend/src/test/functional/MBPartnerLocationTest.java b/extend/src/test/functional/MBPartnerLocationTest.java index a9f650c536..64fa6bacca 100644 --- a/extend/src/test/functional/MBPartnerLocationTest.java +++ b/extend/src/test/functional/MBPartnerLocationTest.java @@ -533,7 +533,7 @@ public class MBPartnerLocationTest extends AdempiereTestCase { m_group.setPriorityBase(MBPGroup.PRIORITYBASE_Same); m_group.save(); - m_partner = new MBPartner (getCtx(), 0, "test"); + m_partner = new MBPartner (getCtx(), 0, getTrxName()); m_partner.setValue (""); m_partner.setName ("Test Business Partner Location"); m_partner.setName2 (null); @@ -553,7 +553,7 @@ public class MBPartnerLocationTest extends AdempiereTestCase { m_partner.setBPGroup(m_group); // Reset Created, Updated to current system time ( teo_sarca ) if(m_partner.save()) { - bpl = new MBPartnerLocation (getCtx(), 0, "test"); + bpl = new MBPartnerLocation (getCtx(), 0, getTrxName()); bpl.setIsActive(true); bpl.setName("Test Business Partner Location"); bpl.setC_BPartner_ID(m_partner.get_ID());